summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Fix missing namespace.ck2010-02-011-0/+4
| |/ /
* | | Merge remote branch 'qt/4.6' into qt-master-from-4.6Qt Continuous Integration System2010-02-015-344/+376
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qeventdispatcher_mac.mm src/gui/kernel/qt_cocoa_helpers_mac.mm src/gui/widgets/qmenu_mac.mm tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * | Fix rendering with simple shader in GL2 engineTom Cooksey2010-01-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Need to bind the PMV matrix's attributes to their indexes in the simple shader, which is created in a seperate code path to all the other shaders. This should fix the qgl autotest failures. Reviewed-By: TrustMe
| * | Purely cosmetic (formatting) changes to GL2 engine's GLSLTom Cooksey2010-01-211-333/+357
| | | | | | | | | | | | | | | | | | This makes GLSL dumps _significantly_ easier to read. Reviewed-By: TrustMe
| * | Use an attribute value for the PMV matrix rather than a uniformTom Cooksey2010-01-215-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has several advantages: First, updating an attribute value seems to be cheaper than updating a uniform. Second, vertex atribute values are independent of shader program, which means they persist across changing of the shader program. This makes code simpler and reduces GL state changes. Note: Credit goes to Samuel for finding this little gem. :-) For the 25920 solid QGraphicsRectItem test case, this gives 10% improvement on desktop and 27% on the SGX. Reviewed-By: Kim
| * | Remove unnecessary depth uniform from GL2 engine's GLSLTom Cooksey2010-01-211-6/+0
| | | | | | | | | | | | Reviewed-By: Samuel
* | | Fixed compile of QTriangulator on Solaris.Kim Motoyoshi Kalland2010-01-261-5/+7
| | | | | | | | | | | | Reviewed-by: Trond
* | | Merge branch '4.6'Thiago Macieira2010-01-212-2/+2
|\ \ \ | |/ / | | | | | | | | | Conflicts: tools/assistant/lib/qhelpsearchquerywidget.cpp
| * | Fix copyright year.Jason McDonald2010-01-192-2/+2
| |/ | | | | | | Reviewed-by: Trust Me
* | Updated painter path caching in the GL2 engine after merge.Kim Motoyoshi Kalland2010-01-191-3/+2
| | | | | | | | | | | | The painter path caching needed to be updated after an optimisation (45fedfeb) in the 4.6 branch was merged into the master branch.
* | Merge branch '4.6'Thiago Macieira2010-01-1314-50/+89
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt doc/src/deployment/deployment.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/xml/qxmlstream.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h tools/assistant/tools/assistant/centralwidget.cpp tools/linguist/lupdate/main.cpp
| * Fixed tst_qgl multipleFBOInterleavedRendering.Samuel Rødal2010-01-131-1/+1
| | | | | | | | | | | | | | | | We need to clobber the vertex attribute pointers _before_ we call setState() to regenerate the clip, or we'll use invalid vertex pointers when writing the clip. Reviewed-by: Paul
| * Merge remote branch 'qt/4.6' into oslo-staging-2/4.6Paul Olav Tvete2010-01-1213-13/+13
| |\ | | | | | | | | | | | | Conflicts: dist/changes-4.6.1
| | * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-081-0/+3
| | |\ | | | | | | | | | | | | | | | | Conflicts: src/multimedia/audio/qaudioformat.cpp
| | * \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-0713-13/+13
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| | | * | Update copyright year to 2010Jason McDonald2010-01-0613-13/+13
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
| * | | | Fixed subpixel antialiased text drawing with the GL2 engine.Kim Motoyoshi Kalland2010-01-111-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug where drawing subpixel antialiased glyphs on a translucent surface would cause all the pixels in the glyphs' bounding box to become opaque. Task-number: QTBUG-7190 Reviewed-by: Trond
| * | | | Track the glVertexAttribPointer and only update it if it's changedTom Cooksey2010-01-113-34/+61
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | This removes a lot of unnecessary GL state changes resulting in an 18% performance boost on desktop and 5% on SGX for the 25920 3x3 solid rectangle test case. Reviewed-By: Samuel
* | | | Add QT_{BEGIN,END}_NAMESPACE to qtextureglyphcache_gl.cpp.ck2010-01-111-0/+4
| | | |
* | | | Merge branch '4.6'Thiago Macieira2010-01-086-370/+459
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qfsfileengine.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/opengl.pro
| * | | Reset the GL stencil mask, op and function in resetGLState().Trond Kjernåsen2010-01-071-0/+3
| |/ / | | | | | | | | | | | | Task-number: QTBUG-7203 Reviewed-by: Samuel
| * | Revert "Add GLfloat[2][2] & GLfloat[3][3] uniform setters to QGLShaderProgram"Tom Cooksey2010-01-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't add new public methods in patch releases. This reverts commit 2b4d3391fd922dfc5ac28815bbd5f36c4041b658. This patch also fixes the paint engine to use glUniformMatrix3fv directly now it has been removed from 4.6. It is a 3 line change. Reviewed-By: Samuel
| * | fix compilation in GL2 paint engine for WindowsGunnar Sletta2010-01-051-0/+1
| | |
| * | Move QGLTextureGlyphCache into it's own fileTom Cooksey2010-01-054-238/+346
| | | | | | | | | | | | Reviewed-By: Samuel
| * | Remove QGLShareRegister and transfer its functionality to QGLContextGroupRhys Weatherley2010-01-041-6/+9
| | | | | | | | | | | | | | | Task-number: QT-2600 Reviewed-by: Samuel
| * | Introduce new "snapToPixelGrid" flag to GL2 engine for drawTextTom Cooksey2010-01-042-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're rendering text, the glyphs need to be aligned to the pixel grid otherwise we get strange artifacts. Normally text is drawn at integer coordinates, however it is still possible to have a transform which translates by a non-integer offset. This patch adds a flag to the engine which can be used to snap any translate to the pixel grid. Task-number: QTBUG-7094 Reviewed-By: Kim
| * | Also delete blitShader & simpleShader in ~QGLEngineSharedShadersTom Cooksey2009-12-301-0/+10
| | | | | | | | | | | | Reviewed-By: Trustme
| * | fix a memory leak in QGLEngineSharedShadersjianliang792009-12-302-0/+8
| | | | | | | | | | | | | | | Merge-request: 412 Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
| * | Fixed QGLWidget::renderText().Trond Kjernaasen2009-12-302-90/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fall back and use the GL 1 engine for the renderText() functions. Getting it to work with the GL 2 engine is a futile effort. Making it work with renderPixmap() in the GL 2 engine is not possible at all, since software contexts in general do not support shader programs. Task-number: QTBUG-5002, QTBUG-6931 Reviewed-by: Kim
| * | Remove superfluous enable/disable vertex arrtib arraysTom Cooksey2009-12-301-34/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the shader manager takes care of enabling/disabling the vertex attribute arrays for us, the GL2 paint engine doesn't have to do it. This reduces GL state changes within the paint engine and provides significant performance improvements. For a given test case (25,000 3x3px solid rects), the improvement is 67% on desktop (nVidia) and 9% on embedded (SGX). Reviewed-By: Kim
| * | Track which vertex attrib arrays are enabled in QGLContextPrivateTom Cooksey2009-12-303-5/+38
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The GL2 engine (and probably Qt/3D) needs to track which vertex attribute arrays are currently enabled and which are disabled. As this is per-context state, the logical place to track this is in the context and not in the paint engine. This patch also makes the GL2 engine's shader manager enable/disable the appropriate attribute arrays for a given shader program when it is used. Reviewed-By: Kim
* | Fix compilation breakage caused by merge.Thiago Macieira2010-01-061-1/+1
| | | | | | | | | | | | This function was renamed in b06313579aad82f8dda64ad14384080754f2b222. Reviewed-by: TrustMe
* | Change from std::pair to QPair.Thiago Macieira2010-01-061-8/+8
| | | | | | | | | | | | | | My Qt is built with -no-stl, so the STL headers aren't included and, thus, std::pair isn't defined. Reviewed-by: Trust Me
* | GCC doesn't like comment lines ending in \Thiago Macieira2010-01-061-28/+28
| | | | | | | | | | | | | | | | src/opengl/gl2paintengineex/qtriangulator.cpp:655:5: warning: multi-line comment So add some padding characters to the right (can't just add spaces though). Reviewed-by: TrustMe
* | Merge branch '4.6'Thiago Macieira2010-01-054-169/+184
|\ \ | |/ | | | | | | Conflicts: src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
| * Remove pointless const's from functions (internal API)Tom Cooksey2009-12-292-4/+4
| | | | | | | | | | | | | | This change is in response to the review for b063135, but was missed from that patch. Reviewed-By: Kim
| * Lots of mostly cosmetic cleanups to GL2 paint engineTom Cooksey2009-12-284-138/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move most of drawPixmaps to private * Move most of stroke to private * Remove dead code: context() * Make optimiseForBrushTransform use xform type * Use GLuint for uniform location * Rename lastTexture -> lastTextureUsed * Move qopengl2paintengine_cleanup_vectorpath to private * Re-ordered declarations in header * Remove dead temporaryTransform * Rename use_system_clip -> useSystemClip Reviewed-By: Kim
| * Move the 0.5 offset we add for aliased rendering to updateMatrix()Tom Cooksey2009-12-282-33/+47
| | | | | | | | | | | | | | | | | | | | | | The old code set and unset a temporary matrix for every draw command when doing aliased rendering. Instead, we just use a flag to indicate that updateMatrix() should add the offset. This means the offset is added only once. When doing lots of small rendering operations on a (non-multisampled) QGLWidget, this gives up to 72% performance boost on the SGX. Reviewed-By: Kim
| * Fix text rendering on GL2 paint engineTom Cooksey2009-12-232-5/+11
| | | | | | | | | | | | | | | | | | | | | | If you draw with a brush, then draw a pixmap, then draw with the same brush, the GL2 engine wouldn't update the fragment shader to use the brush. This is because it detected the brush hadn't changed and so didn't need updating. To fix this, we now set the current brush to noBrush when drawing an image/pixmap so the engine knows it needs to update the GL state for the brush. Reviewed-By: Kim
* | Merge branch '4.6'Thiago Macieira2009-12-266-181/+226
|\ \ | |/ | | | | | | | | | | Conflicts: examples/webkit/fancybrowser/main.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp tools/assistant/tools/assistant/bookmarkmanager.cpp
| * Use 3x3 PMV matrices rather than 4x4 in the GL2 engineTom Cooksey2009-12-223-64/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsView based applications will set a new transform for every item before it's painted. This leads to lots of updates to the PMV matrix. So switching to a 3x3 rather than a 4x4 gives us less data to pass to GL for each QGraphicsItem which gets rendered. It also means the vertex shader is more efficient. However, this patch only gives a maximum 2.5% speed improvement on the SGX, which seems to be only due to the faster vertex shader rather than the reduced amount of data we pass to GL. Reviewed-By: Kim
| * Handle broken shaders better in the GL2 engine's shader managerTom Cooksey2009-12-221-77/+114
| | | | | | | | | | | | | | The shader manager will now a) not seg-fault and b) actually tell you which shader has the error. Reviewed-By: Kim
| * Prevent access to non-existent memory in triagulating strokerRhys Weatherley2009-12-181-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | In the triangulating stroker, the last point was being duplicated in dashed paths. But because QDataBuffer::add() takes a ref to a float rather than a float, it would resize the data buffer and then try to fetch the values out of a pointer to the original buffer memory. This change copies the values into temporary variables before resizing the array. Task-number: QTBUG-6045 Reviewed-by: Sarah Smith
| * GL2Engine: Don't mark brush as dirty if it hasn't changedTom Cooksey2009-12-173-34/+41
| | | | | | | | | | | | | | | | If the same brush is used over and over again, this gives a huge performance boost (measured to be 25% faster on desktop and 73% faster on SGX). Reviewed-By: Samuel Rødal
| * Optimized blur / drop shadow effects for the GL 2 paint engine.Samuel Rødal2009-12-142-4/+1
| | | | | | | | | | | | | | | | | | Do the blur in half the resolution in software and then upload the result as a texture and smooth-scale it on the GPU. This leads to stable and decent performance regardless of the blur radius, and simplifies the implementation quite a bit. Reviewed-by: Bjørn Erik Nilsen
* | Fixed memory leak in caching of concave paths in GL2 engine.Kim Motoyoshi Kalland2009-12-171-18/+21
| | | | | | | | Reviewed-by: Gunnar
* | Implemented caching of concave vector paths in the GL2 engine.Kim Motoyoshi Kalland2009-12-152-26/+130
| | | | | | | | Reviewed-by: Gunnar
* | Fixed integer overflow in QTriangulator.Kim Motoyoshi Kalland2009-12-151-6/+6
| | | | | | | | The result of a function returning qint64 was stored in an int.
* | Fixed QGL2PEXVertexArray to interpolate within the range [0, 1].Kim Motoyoshi Kalland2009-12-151-1/+1
| | | | | | | | | | Because of numerical inaccuracy, the interpolation factor could exceed 1 by a small amount which would cause an assert failure.
* | Merge commit 'origin/4.6'Olivier Goffart2009-12-151-62/+34
|\ \ | |/ | | | | | | | | | | Conflicts: src/corelib/io/qfsfileengine.cpp src/network/access/qnetworkrequest.cpp tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp