summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Fixed many spelling errors.Rohan McGovern2010-10-251-1/+1
| | |
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-252-21/+10
|\ \ \ | |/ / | | / | |/ |/| | | | | | | | | | | Conflicts: demos/declarative/snake/snake.qml qmake/generators/symbian/symbiancommon.cpp src/network/access/qnetworkaccessmanager.cpp src/s60installs/s60installs.pro tests/auto/qitemselectionmodel/tst_qitemselectionmodel.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| * Functions that are externally defined to QtOpenGL needs to be imported.Jani Hautakangas2010-10-211-1/+1
| | | | | | | | | | | | This is needed for RVCT4 Reviewed-by: Jason Barron
| * Fix GL_OES_element_index_uint and add GL_OES_depth24 detection.Jani Hautakangas2010-10-202-20/+9
| | | | | | | | | | | | | | | | | | GL_OES_element_index_uint detection was not working because EGL config wasn't yet resolved. In addition QFrameBufferObject should use 24bit depth render buffer if extension is available. Task-number: QTBUG-14542 Reviewed-by: Gunnar
| * Fix text rendering in GL when using the broken-fbo-fallbackEskil Abrahamsen Blomfeldt2010-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is a backport of 3874cd95e203da40d5205ef6455d7f56cba6923a which was committed to qt:master. Since the patch that originally exposed the bug was added to 4.7.2, this patch is required there as well. Bug is visible when resizing the glyph cache on devices where QGLContext::brokenFBOReadback defaults to true, or by setting this to true on desktop. Reviewed-by: Gunnar
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-10-073-138/+324
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp qmake/generators/win32/msbuild_objectmodel.h qmake/generators/win32/msvc_objectmodel.cpp qmake/generators/win32/msvc_vcxproj.cpp src/corelib/arch/qatomic_arm.h tests/auto/qglthreads/tst_qglthreads.cpp
| * Quick fix for OSX and Windows/Mingw compilation errors.Jani Hautakangas2010-10-051-8/+8
| | | | | | | | | | | | | | | | | | | | On OSX AssertMacros.h header has macro called verify() and QRBTree::verify() function was substituted by this macro. On Windows/Mingw includes need to point to exported private include folder. Reviewed-by: Kim
| * Fix gcc compilation problems in QtOpenGL. Actually was typo andJani Hautakangas2010-10-041-2/+2
| | | | | | | | | | | | for some reason rvct didn't catch that. Reviewed-by: TRUSTME
| * Enable QtOpenGL vector path caching on Symbian/IVE3Jani Hautakangas2010-10-043-134/+320
| | | | | | | | | | | | | | | | | | | | IVE3 doesn't support UNSIGNED_INT <type> index values in DrawElements. This patch checks if GL_OES_element_index_uint extensions is supported and determines DrawElement indices type based on that. On desktop environment UNSIGNED_INT is always supported. Task-number: QTBUG-13563 Reviewed-by: Gunnar
* | Fix GL glyph cache with broken-fbo-fallbackEskil Abrahamsen Blomfeldt2010-10-061-1/+1
| | | | | | | | | | | | | | | | When reading from the resized image, we have to use the actual width of the image, since we're reading the bits directly. This used to work because the width never changed. Reviewed-by: Gunnar
* | Work around OpenGL driver reading arrays asyncronouslyEskil Abrahamsen Blomfeldt2010-10-052-24/+25
| | | | | | | | | | | | | | | | Some drivers, e.g. the Nvidia driver on Windows, will sometimes read the coordinate arrays asyncronously, which causes a crash if they are allocated on the stack. Reviewed-by: Kim
* | Merge remote branch 'origin/4.7' into master-from-4.7Rohan McGovern2010-10-044-27/+78
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/snippets/code/doc_src_qmake-manual.qdoc src/corelib/arch/symbian/arch.pri src/declarative/graphicsitems/qdeclarativeflickable.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h tests/auto/qfontmetrics/tst_qfontmetrics.cpp
| * Fallback to A8 text rendering on Mac when LCD smoothing is disabledAaron Kennedy2010-09-291-0/+7
| | | | | | | | | | Task-number: QTBUG-14050 Reviewed-by: Eskil Abrahamsen Blomfeldt
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7Aaron Kennedy2010-09-281-28/+2
| |\
| * | Minimize parameter changes on glyph cache texturesAaron Kennedy2010-09-283-5/+32
| | | | | | | | | | | | | | | | | | | | | Cache the last set filtering mode on glyph textures and update only when necessary. Reviewed-by: Gunnar Sletta
| * | Only set maskTexture sampler uniform onceAaron Kennedy2010-09-282-6/+13
| | | | | | | | | | | | | | | | | | | | | Qt always uses the same texture unit as the maskTexture, so it makes sense to set the uniform only once when the program is created. Reviewed-By: Gunnar Sletta
| * | Only repopulate the glyph cache when we know something could have changedAaron Kennedy2010-09-281-11/+16
| | | | | | | | | | | | Reviewed-by: Gunnar Sletta
| * | Remove unnecessary attribute changesAaron Kennedy2010-09-231-2/+0
| | | | | | | | | | | | | | | | | | | | | The only consumer of TextDrawingMode is drawCachedGlyphs, and it always sets these two attrib pointers anyway. Reviewed-By: Gunnar Sletta
| * | Invalidate QStaticText coord cache when texture size changesAaron Kennedy2010-09-231-1/+8
| | | | | | | | | | | | | | | | | | | | | If the glyph cache texture changes size, the texture coordinate array must be regenerated to point to the correct texture locations. Reviewed-By: Gunnar Sletta
* | | Make texture glyph cache on OpenGL work without a paint engineEskil Abrahamsen Blomfeldt2010-09-292-12/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When used from outside of Qt, the OpenGL texture glyph cache would fall back to using an image backend. This was not exactly ideal, so instead it's rewritten to set up its own blit program etc. when the paint engine is not available. Note that fillInPendingGlyphs() will potentially alter the current GL state/viewport/bindings/etc., so it should be called before setting up the actual painting. Reviewed-by: Kim
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-281-28/+2
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
| * | Compile on Symbian - rework the X11 mask patch a bit.Trond Kjernåsen2010-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Avoid adding a virtual QPixmapData::hasMask() function, we can do without it. Made QPixmap::hasAlpha() fast, so we can use that instead. Reviewed-by: Samuel
| * | Fixed drawing of QPixmaps with masks in the GL 2 and X11 engines.Trond Kjernåsen2010-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A regression from 4.6.x. This is an X11-only problem caused by the separate masks that an X11 QPixmap can contain. These masks we're not taken into account when a number optimizations were done for 4.7. Introduction of the texture-from-pixmap extension in 4.6 also broke masked pixmaps under X11. Task-number: QTBUG-13814 Reviewed-by: Samuel
| * | Revert "Fixed painter path drawing on FBO without stencil buffer."Kim Motoyoshi Kalland2010-09-221-26/+0
| |/ | | | | | | | | This reverts commit 89cbb165600de9a557a8a621dc41b93c2a7a2b52. The patch should be applied to Qt 4.8, not 4.7.
* | Fix problems in QTextureGlyphCache caused by insufficient mergeEskil Abrahamsen Blomfeldt2010-09-241-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Since the logic of QTextureGlyphCache has been changed, it is impossible to do an automatic merge of eb2926a2f9607e985b8bca54346e6fdf91343247. This change fixes problems that occurred with that change: 1. We need to postpone actually resizing the texture until fillInPendingGlyphs() where we are sure to have a context. 2. We have to fall back to a default max texture size when there is no context. Reviewed-by: Trond
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-222-0/+11
|\ \ | |/ | | | | | | | | Conflicts: src/gui/painting/qtextureglyphcache_p.h src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
| * Fixed drawing a large number of glyphs with the same font under GL.Trond Kjernåsen2010-09-212-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our glyph caching system doesn't take GL texture size limitation into account, and assumes you can create an infinitely large texture. On top of that, the cache will never create a cache that is wider than 256, or QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH, which means we'll hit the texture size limit even faster. With this patch the entire texture is utilized. However, to fix in properly we need to support having multiple texture for each font engine. That will be fixed shortly (see task QTBUG-13784). Task-number: QT-3971 Reviewed-by: Eskil
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-09-212-0/+27
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qobject.h src/declarative/graphicsitems/qdeclarativeflickable.cpp src/declarative/graphicsitems/qdeclarativeflickable_p_p.h src/declarative/util/qdeclarativelistmodel.cpp
| * Fixed painter path drawing on FBO without stencil buffer.Kim Motoyoshi Kalland2010-09-201-0/+26
| | | | | | | | | | Task-number: QTBUG-13450 Reviewed-by: Samuel
| * Fixes QPen dash offset for OpenGL paint engines (1.x & 2.x).Yoann Lopes2010-09-201-0/+1
| | | | | | | | | | Task-number: QTBUG-13409 Reviewed-by: Trond
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-09-103-5/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix typos. Fix typo in declative example. test for gdb version before runnning dwarf indexing Fix Core Text font loading for certain Mac Fonts Support sub pixel positioning of glyphs in raster engine Added basic tests for threaded QPainter drawing onto FBOs and PBOs.
| * | Support sub pixel positioning of glyphs in raster engineEskil Abrahamsen Blomfeldt2010-09-093-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the raster engine to provide the same quality of text rendering as the native engine on Mac Cocoa, we need to support rendering to different sub pixel positions for each glyph. The number of subpixel positions is arbitrary and has to be detected, but it's usually three or four. Each position will give slightly different coverages inside the pixel and thus different rasterizations. Other font engines which support sub pixel positioning of glyphs can provide the same functionality by implementing supportsSubPixelPositions() to return true, and then adding the subPixelPosition argument to the x coordinate used in alphaRGBMapForGlyph(). Task-number: QTBUG-5053 Reviewed-by: Jiang Jiang
* | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-102-0/+8
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt demos/declarative/snake/content/snake.js demos/declarative/snake/snake.qml doc/src/development/qmake-manual.qdoc src/corelib/plugin/plugin.pri src/gui/kernel/qapplication_win.cpp src/gui/kernel/qdesktopwidget_win.cpp src/gui/painting/qdrawhelper.cpp tests/auto/qdir/tst_qdir.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf
| * Some optimizations to the GL pixmap data.Samuel Rødal2010-09-092-0/+8
| | | | | | | | | | | | | | - Don't use toImage() / fromImage() to copy when a render FBO is active. - Use raster for rendering to small (< 32x32) pixmaps. Reviewed-by: Trond
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-08-252-4/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/win32/msbuild_objectmodel.cpp src/declarative/qml/qdeclarativexmlhttprequest.cpp src/opengl/opengl.pro src/opengl/qgl_p.h src/plugins/bearer/connman/qconnmanservice_linux.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/assistant/tools/assistant/openpageswidget.h
| * Introduce QtOpenGL module for Symbian.Jani Hautakangas2010-08-202-4/+20
| | | | | | | | | | Task-number: QT-2139 Reviewed-by: Gunnar Sletta
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-07-281-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication.cpp tests/auto/qfileinfo/tst_qfileinfo.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt.qdocconf
| * Silence warning when building with MSVC 2005Andy Shaw2010-07-141-1/+1
| | | | | | | | Reviewed-by: Eskil
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-152-6/+0
|\ \ | |/ | | | | | | Conflicts: src/gui/kernel/qapplication.h
| * Fix text drawing into alpha pixmap with opengl engineEskil Abrahamsen Blomfeldt2010-07-072-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The merge 03dc74984749adf5b11482bf871a47086217845c mistakenly merged the glyphMargin() (which had been removed in 4.7 because QGLTextureGlyphCache now inherits from the image glyph cache) with the glyphPadding() which had been introduced in separate commits in both branches (probably backported.) This broke text drawing into a pixmap with an alpha with the GL engine, because we'd assume a margin of 1, but the alphaMapForGlyph() function doesn't support margins. Task-number: QTBUG-11987 Reviewed-by: Gunnar
* | Made QGL2GradientCache thread safe.Trond Kjernåsen2010-07-072-7/+26
| | | | | | | | | | This can be improved by using a QReadWriteLocker, but it means restructuring the find/insert code. Use a QMutex for now.
* | Initialize pex.Trond Kjernåsen2010-07-021-0/+1
| | | | | | | | This got lost in a conflict resolving session.
* | Rework how QGLTextureGlyphCache makes use of the resource system.Trond Kjernåsen2010-07-023-56/+76
| | | | | | | | | | | | Separate out the GL objects (the texture and the fbo) that needs to be tracked into a QGLGlyphTexture structure and make that accessible via a QGLContextGroupResource object.
* | Clean up debug output.Trond Kjernåsen2010-07-023-7/+19
| |
* | Rework the internal GL resource system yet again.Trond Kjernåsen2010-07-024-63/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having to sub-class QGLContextResource, we now have two template classes: 1. 'QGLContextResource' to handle context specific resources that are *not* shared in a group, even though the context itself is in a sharing group 2. 'QGLContextGroupResource' to handle resources shared in a context group. Classes used as the template class type must have a constructor with the following signature: T(const QGLContext *); The resources that the templates wrap are freed up when the context or context group it is tied to is destroyed. The resource is also freed when the QGLContext<Group>Resource object is destroyed, which might lead to context switches, depending on where and in how many non-sharing contexts the resource is used. The templates wrap some boiler plate code that were common for all the use cases.
* | Make the GL texture cache share textures between shared contexts.Trond Kjernåsen2010-07-021-2/+3
| | | | | | | | | | | | Up until now the GL 2 engine texture cache did not share glyph textures between sharing contexts, which is bad. Fix this by using the context group's context as the cache key.
* | Redesigned how GL resource management works.Trond Kjernåsen2010-07-026-119/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The usage of QGLContextResource has changed: You're now have to subclass QGLContextResource and reimplement the freeResource() function and add your cleanup code there instead of using a plain callback function. It's now also possible to delete a QGLContextResource *before* the QGLContextGroup it refers to is destroyed, as the resource will remove itself from the context groups it's a member of. The QGLTextureGlyphCache is no longer a QObject, and it no longer depends on the aboutToDestroyContext() signal. That concept doesn't work in a threaded environment, as it relies on an eventloop to dispatch the signal to the thread. It's common to *not* have an eventloop running in a thread, which means the signal might never be delivered. QGLTextureGlyphCache now inherits from QGLContextResource, and gets cleaned up correctly when the group context is destroyed. Note that up until now the glyph cache has never been shared among sharing contexts for the GL 2 engine. Made the gradient and pixmap blur caches use the new QGLContextResource scheme. Added a template that wraps the common init code for paintEngine() function implementations for QGLWidget, QGLPixelBuffer and QGLFramebufferObject. Fixed a bug in QFontCache where the font caches weren't cleared when a thread other than the main thread exited (backported to 4.6.3), which caused resource leaks.
* | Don't use the QGLSignalProxy to clean up the thread-local shaders.Trond Kjernåsen2010-07-021-17/+32
| | | | | | | | | | | | After much back and forth I think we can use this approach for cleaning up thread-local, shared resources. Main problem has been dealing with dangling pointers and references, but they should be solved now.
* | Simplify how the QGLEngineSharedShaders object is cleaned up.Trond Kjernåsen2010-07-021-35/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two things that needs to be done when cleaning up those objects: 1) if the context is destroyed before the specific thread exits, the shaders that is allocated within that context needs to be cleanup before the context is destroyed. 2) if the thread exits before the context is destroyed, the thread needs to clean up the shaders and then delete the QGLEngineSharedShaders object. We can't use a QGLContextResouce for that because a) we don't know if our context ptrs are valid, b) QGLContextResource doesn't remove themselves from the QGLContextGroups internal list when destroyed, so we might get a free() call *after* the resource had been destroyed. Use the contextDestroyed() signal from QGLSignalProxy() instead, which is cleaner and actually works..
* | More work on GL threading.Trond Kjernåsen2010-07-022-25/+82
| | | | | | | | | | | | | | | | | | | | Removed QObject inheritance from QGLEngineSharedShaders and made it thread-local, so that paintengines in different threads can use programs without clashing. Lifted some restrictions on QPixmap so that they may be used in threads when the GL2 engine is active. Made the QGLContextGroup a part of the pixmap and image cache keys.