summaryrefslogtreecommitdiffstats
path: root/src/opengl
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-07-285-14/+19
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * Do check after all if we have partialUpdateSupport.Michael Dominic K2010-07-261-4/+3
| | | | | | | | | | | | Task-number: QTBUG-12266 Merge-request: 752 Reviewed-by: Trond
| * QGLBuffer::bind()/release() should not be const functions.Trond Kjernåsen2010-07-262-4/+4
| | | | | | | | | | | | | | | | This is more or less the same as in the QGLFramebufferObject::bind()/release() case. Task-number: QTBUG-12319 Reviewed-by: Kim
| * Merge remote branch 'origin/4.7' into 4.7-from-4.6Rohan McGovern2010-07-172-5/+11
| |\ | | | | | | | | | | | | Conflicts: tests/auto/qtexttable/tst_qtexttable.cpp
| | * Silence warning when building with MSVC 2005Andy Shaw2010-07-141-1/+1
| | | | | | | | | | | | Reviewed-by: Eskil
| | * doc: Fixed several qdoc warnings.Martin Smith2010-07-131-4/+10
| | |
| * | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-07-151-1/+1
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.h src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/page/FrameView.h src/3rdparty/webkit/WebCore/platform/ScrollView.cpp src/3rdparty/webkit/WebCore/platform/ScrollView.h src/corelib/plugin/quuid.cpp src/gui/dialogs/qfontdialog.cpp src/multimedia/audio/qaudiodevicefactory.cpp src/opengl/qgl.cpp src/openvg/qpaintengine_vg.cpp tests/auto/qxmlquery/tst_qxmlquery.cpp
| | * The Q_WGL define was removed years ago.Trond Kjernåsen2010-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The proper define should be Q_WS_WIN. Task-number: QTBUG-12040 Reviewed-by: Prasanth Reviewed-by: Eskil
* | | Merge remote branch 'origin/master' into qt-master-from-4.7Thiago Macieira2010-07-151-1/+1
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: src/opengl/qgl_p.h
| * | | Compile with qmlscene.Bjørn Erik Nilsen2010-07-151-1/+1
| | | | | | | | | | | | | | | | Reviewed-by: kim
* | | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-1510-38/+85
|\ \ \ \ | |/ / / |/| / / | |/ / | | | 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
| * | Got rid of unused variable compiler warning.Samuel Rødal2010-07-011-1/+1
| | |
| * | QGLWindowSurface support for partial updates via EGL_NOK_swap_region2Michael Dominic K2010-07-014-2/+41
| | | | | | | | | | | | | | | | | | | | | (if extension available). Merge-request: 712 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Check for EGLSurface leak only when paint device is a QGLWidget.Michael Dominic K2010-07-011-9/+12
| | | | | | | | | | | | | | | | | | | | | (not QGLWindowSurface for example). Merge-request: 722 Reviewed-by: Trond
| * | Export various symbols needed to make a custom GL graphicssystem.Michael Dominic K2010-06-303-2/+4
| | | | | | | | | | | | | | | Merge-request: 2422 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| * | Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7Gunnar Sletta2010-06-308-8/+47
| |\ \
| | * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-06-286-6/+13
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits) Fix an assertion in comp_func_SourceOver_sse2() if const_alpha == 0 Add a manual test for regular widget interaction with the table. New variant of ::createPixmapData with origin for QGraphicsSystem. EGL plane levels are the same as all other GL backends. Need to access extensionFuncs in subclasses too. Export QGLWindowSurface too. Export the QGLPixmapData so that we can override it in a custom graphics system. Fixed autotest failure in QPathClipper on N900. Fixed autotest failure in QPainter::setOpacity when NEON is used. Fix compilation when configured with -no-xrender Add a new (internal) flag QGraphicsItem::ItemStopsClickFocusPropagation. Fixed some potential index-out-of-bounds issues in QImage. Fixed autotest failure in fillRect_stretchToDeviceMode Adding a known issue for VC2010 64 bit Added a note to desupport VC2010 64-bit Normalize integers when calling glVertexAttribPointer() Add an implementation of comp_func_solid_SourceOver_neon() with Neon. Fix the casts of qdrawhelper_sse2 Add a SSE2 implementation of comp_func_solid_SourceOver() Add a SSE2 version of comp_func_SourceOver() ...
| | | * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-06-276-6/+13
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (21 commits) EGL plane levels are the same as all other GL backends. Need to access extensionFuncs in subclasses too. Export QGLWindowSurface too. Export the QGLPixmapData so that we can override it in a custom graphics system. Fixed autotest failure in QPathClipper on N900. Fixed autotest failure in QPainter::setOpacity when NEON is used. Fix compilation when configured with -no-xrender Add a new (internal) flag QGraphicsItem::ItemStopsClickFocusPropagation. Fixed some potential index-out-of-bounds issues in QImage. Fixed autotest failure in fillRect_stretchToDeviceMode Adding a known issue for VC2010 64 bit Added a note to desupport VC2010 64-bit Normalize integers when calling glVertexAttribPointer() Add an implementation of comp_func_solid_SourceOver_neon() with Neon. Fix the casts of qdrawhelper_sse2 Add a SSE2 implementation of comp_func_solid_SourceOver() Add a SSE2 version of comp_func_SourceOver() Fixed missing copy of raster pixmap data after change fb76a872e20bd. Fixed QPixmap::toImage() bug introduced in fb76a872e20bd. Optimized sub-rect copying / painting of QPixmaps. ...
| | | | * | EGL plane levels are the same as all other GL backends.Trond Kjernåsen2010-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt has never used level 1 for the main plane, it's always been 0 and will always be 0. Reviewed-by: Harald Fernengel
| | | | * | Need to access extensionFuncs in subclasses too.Michael Dominic K2010-06-252-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 2422 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| | | | * | Export QGLWindowSurface too.Michael Dominic K2010-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 2422 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| | | | * | Export the QGLPixmapData so that we can override it in a custom graphics system.Michael Dominic K2010-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge-request: 2422 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
| | | | * | Normalize integers when calling glVertexAttribPointer()Rhys Weatherley2010-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QGLShaderProgram::setAttributeArray() is used with a type like GL_UNSIGNED_BYTE, it is normally going to be a value that should be normalized to the range 0..1. But the function wasn't normalizing, which led to errors in programs that used per-vertex colors with the 4ub representation. Reviewed-by: Sarah Smith
| * | | | | support BGRA textures on SGXGunnar Sletta2010-06-301-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Samuel
* | | | | | Track the GL DCs we use across different threads under Windows.Trond Kjernåsen2010-07-083-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A DC returned by GetDC() is only valid within the context of the calling thread, so we need to track which tread a DC belongs to. Reviewed-by: Kim
* | | | | | 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.
* | | | | | Don't call GetDC() nedlessly.Trond Kjernåsen2010-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that the CS_OWNDC class style flag only returns the same DC when GetDC() is called in the same thread that created the window. This in turn generates a bad DC resource leak if you have a rendering thread with one or more GL context switches, so just call GetDC() when you actually need to. Reviewed-by: Kim
* | | | | | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-07-0614-241/+339
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits) QGLPixelBuffer should not rely on temporary QGLWidgets. Initialize pex. Remove warning. Fix the tests for the internal GL resource system. Rework how QGLTextureGlyphCache makes use of the resource system. The group pointer should no longer be a part of the 64 bit int. Enable glyph uploads from a thread in the X11 font engine. Make qt_pixmap_serial thread-safe. Clean up debug output. Clarification regarding the WA_X11InitThreads flag. Rework the internal GL resource system yet again. Check Qt::AA_X11InitThreads to determine pixmap usage in threads. Add an application attribute to control XInitThreads(). Unnecessary alloc + remove unused headers. QGLPixelBuffer should manage its own paint engines. Remove the DDS texture cache. Make the GL texture cache share textures between shared contexts. Redesigned how GL resource management works. Don't use the QGLSignalProxy to clean up the thread-local shaders. Simplify how the QGLEngineSharedShaders object is cleaned up. ...
| * | | | | | QGLPixelBuffer should not rely on temporary QGLWidgets.Trond Kjernåsen2010-07-051-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QGLTemporaryContext instead. Also, to re-use already registered window classes for the temporary native window, make qt_reg_wndclass() register a QWidget default class if it's passed a 0 pointer. Reviewed-by: Gunnar
| * | | | | | Initialize pex.Trond Kjernåsen2010-07-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This got lost in a conflict resolving session.
| * | | | | | Remove warning.Trond Kjernåsen2010-07-021-1/+1
| | | | | | |
| * | | | | | Fix the tests for the internal GL resource system.Trond Kjernåsen2010-07-021-2/+2
| | | | | | |
| * | | | | | Rework how QGLTextureGlyphCache makes use of the resource system.Trond Kjernåsen2010-07-024-56/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | The group pointer should no longer be a part of the 64 bit int.Trond Kjernåsen2010-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The group is now a proper part of the QGLTextureCacheKey, and it's no longer necessary with this hack.
| * | | | | | Clean up debug output.Trond Kjernåsen2010-07-024-13/+33
| | | | | | |
| * | | | | | Rework the internal GL resource system yet again.Trond Kjernåsen2010-07-028-108/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | Unnecessary alloc + remove unused headers.Trond Kjernåsen2010-07-021-6/+2
| | | | | | |
| * | | | | | QGLPixelBuffer should manage its own paint engines.Trond Kjernåsen2010-07-022-3/+0
| | | | | | |
| * | | | | | Remove the DDS texture cache.Trond Kjernåsen2010-07-022-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has no practical use and is a leftover from when pixmap/image textures and dds textures used the same cache.
| * | | | | | 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-0211-185/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-023-17/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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..
| * | | | | | Only use the texture_from_pixmap extension in the main thread.Trond Kjernåsen2010-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not possible to bind several texture ids to the same surface that wraps a native X11 Pixmap, which means we can't use it reliably from more than one thread at a time. For now we limit the usage to the main thread.
| * | | | | | More work on GL threading.Trond Kjernåsen2010-07-024-32/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | Make qt_gl_paint_engine() thread-safe.Trond Kjernåsen2010-07-021-7/+36
| | | | | | |
* | | | | | | Merge remote branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2010-07-016-148/+272
|\ \ \ \ \ \ \ | |/ / / / / / |/| | / / / / | | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt src/gui/text/qtextlayout.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp tools/assistant/tools/assistant/helpviewer_qwv.h tools/configure/configureapp.cpp
| * | | | | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into ↵Qt Continuous Integration System2010-06-271-1/+1
| |\ \ \ \ \ | | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: (31 commits) Make symbian/unix shadow builds work again. Change the files to camelcase as avkon now does that Update EABI and WINSCW DEF files for Symbian Fix linking on arm with def files Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to 4b88f595ab62b7c5f703a286c4f5f13f8784a936 Fixed incorrect parsing of TARGET.EPOCHEAPSIZE. Fixed make runonphone that looked for the package in the wrong place. Fixed several problems with the postlinker for Symbian (elf2e32). Don't crash when cleaning the uninitialized fontdatabase (Symbian) Revert "Fixing the race condition in event dispatcher implementation on" Revert "Fixing race condition in qeventdispatcher_symbian.cpp code path" Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to a80fd59e3b3b18116803a14e6369345933994236 Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to a80fd59e3b3b18116803a14e6369345933994236 Fixed memory restrictions not being passed on to elf2e32. Allow TLW translucency on Symbian without Qt::FramelessWindowHint Updated UIDs for spectrum demo Ensure that compiling with the no debug/warning output defines works Updated Harfbuzz from git+ssh://git.freedesktop.org/git/harfbuzz to f0dcb906fe56b5dc06aa305b6cfc821d5dd25a28 Clean up HB_Anchor's DeviceTables on failure when loading format 3 Make sure ValueRecord's DeviceTables are cleaned up on failure ...
| | * | | | Merge branch '4.6-s60' into 4.7-s60axis2010-06-241-1/+1
| | |\ \ \ \ | | | |_|/ / | | |/| | / | | | | |/ | | | |/| | | | | | | | | | | | | | | | Conflicts: src/3rdparty/phonon/qt7/mediaobject.mm src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/plugins/phonon/mmf/mmf.pro