summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use 3x3 PMV matrices rather than 4x4 in the GL2 engineTom Cooksey2009-12-221-29/+29
| | | | | | | | | | | | | 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
* GL2Engine: Don't mark brush as dirty if it hasn't changedTom Cooksey2009-12-171-31/+38
| | | | | | | | 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
* Clean up the QFontEngine glyphcaching code to not crash and be more tidyGunnar Sletta2009-12-101-3/+2
| | | | Reviewed-by: Eskil
* Fix crash when rotating cleartype text under gl engine.Gunnar Sletta2009-12-091-2/+2
| | | | Reviewed-by: Eskil
* Speed up rotated/transformed text on OpenGL2 paint engineGunnar Sletta2009-12-081-61/+34
| | | | | Reviewed-by: Trond Reviewed-by: Tom
* Added caching of vectorpaths to the GL paint engine.Gunnar Sletta2009-12-011-5/+110
| | | | | | | | | | | | | | | The first time a path is drawn we call makeCachable on the path, which means that if it is drawn again, we start caching it. This is a bit of a trick to avoid caching paths that are drawn once and discared while at the same time cache paths that are reused automatically. The GL engine owns the vertex information and is responsible for cleaning it up. If the vectorpath is destroyed first, it will call the cleanup function. if the engine dies first, we still require some hooks to clean up the cache in the path. More to come. When VBO's are used, these will be a leaked if the path is destroyed after the engine. Reviewed-by: Samuel
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Gunnar Sletta2009-12-011-7/+5
|\
| * Fixed square root of negative number in drawTextItem().Kim Motoyoshi Kalland2009-11-301-1/+2
| | | | | | | | | | | | | | | | | | Fixed potential bug where you could end up taking the square root of a negative number in drawTextItem() in the raster and OpenGL paint engines. Task-number: QTBUG-6327 Reviewed-by: Trond
| * Fixed subpixel text antialiasing with the GL2 engine on ATI.Kim Motoyoshi Kalland2009-11-251-4/+1
| | | | | | | | | | | | Use subpixel antialiasing even if the there is an alpha channel. Reviewed-by: Trond
| * Ran the script utils/normalizeOlivier Goffart2009-11-181-2/+2
| | | | | | | | Over src/ tools/ examples/ and demos/
* | Replaced QVector in GL2 vertex array with QDataBuffer to reduce mallocsGunnar Sletta2009-11-251-6/+8
|/ | | | Reviewed-by: Tom Cooksey
* API review: Rename numRects() -> rectCount()Marius Storm-Olsen2009-11-091-1/+1
| | | | | | | QRegion::numRects() is marked obsolete. Removed all usage of the old function inside Qt and test-cases. Reviewed-by: Andreas Aardal Hanssen
* Fix fuzzy aliased rendering on GLES2Tom Cooksey2009-11-061-2/+12
| | | | | | | | | | The GL2 paint engine adds a (0.49,0.49) pixel offset when doing aliased rendering. But this assumed if it was doing aliased rendering then multisampling was disabled. On GLES, multisampling is always enabled if the surface has it enabled. So on GLES, we never add the offset if the surface is multisampled. Reviewed-By: Gunnar
* Use fallback stroker for cosmetic strokes with asymetric transformsGunnar Sletta2009-11-051-0/+8
| | | | Reviewed-by: Samuel
* Modify QGLShader and QGLShaderProgram in response to API reviewRhys Weatherley2009-11-051-2/+2
| | | | Reviewed-by: Sarah Smith
* Added some optimizations to the blur and drop shadow GL filters.Samuel Rødal2009-10-291-2/+6
| | | | | | | | | | | | | | | | | | | | * Use ExpandToTransparentBorderPadMode since we can use GL_CLAMP_TO_EDGE to clamp to the texture. * Shrink the bounding rects reported by the blur and drop shadow filters (expanding by 2 * radius isn't needed). * Use a single-pass blur for radii <= 3 to avoid the overhead of rendering to an FBO. * Made the fast blur setting generate filters for only a predefined set of radii, and then use the actual blur radius to spread the sample points outwards. * Optimized the generated program to rely less on temporary variables, as those seemed to not be handled very well by certain GLSL compilers. Reviewed-by: Gunnar Sletta
* Make use of QVectorPath::isConvex() to speed up rounded rect fillingGunnar Sletta2009-10-271-3/+1
| | | | Reviewed-by: Samuel
* Suppress warnings in QtOpenGL codeRhys Weatherley2009-10-261-0/+1
|
* Integrated new triangulating stroker into QtGunnar Sletta2009-10-191-49/+146
|
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-191-11/+14
|\
| * Fix save() and restore() for the OpenGL2 paint engine.Rhys Weatherley2009-10-121-11/+14
| | | | | | | | | | | | Task-number: QTBUG-4822, QTBUG-4824 Reviewed-by: Sarah Smith Reviewed-by: Samuel
* | Fixed handling of brush origin in the OpenGL paint engines.Kim Motoyoshi Kalland2009-10-131-5/+5
|/ | | | | | | | Fixed the OpenGL paint engines so that the brush origin is applied correctly and for all brushes just like in the raster paint engine. Task-number: QTBUG-2676 Reviewed-by: Trond
* Optimized rasterizing of paths using stencil method in GL 2 engine.Samuel Rødal2009-10-071-3/+3
| | | | | | | | | | | | Making the triangle fan of each sub path start at the sub path's centroid will on average improve performance for complex paths, because less pixels that are outside the path need to be touched. The centroid is a more balanced choice than just picking the first element of the sub path as triangle fan origin. A performance improvement of 20 % was measured for star formed paths. Reviewed-by: Trond
* Optimized clipping in the GL 2 engine for winding fills.Samuel Rødal2009-10-071-29/+40
| | | | | | | | | | | | | When no stencil clip is set we reduce the number of compositing passes for rendering winding fill paths from four to two. When stencil clip is set, the number of compositing passes is reduced from five to four. For clipping with a winding fill path, the number of compositing passes are reduced from five to four when stencil clipping is already enabled. A performance improvement of up to 85 % was measured in certain cases. Reviewed-by: Trond
* Optimized restore() in GL 2 paint engine.Samuel Rødal2009-10-061-13/+37
| | | | | | | Keep track of what state actually changed so we don't have to set all the uniforms as dirty etc. Reviewed-by: Trond
* Changed GL 2 engine render text implementation to use glDepthRange().Samuel Rødal2009-10-061-15/+26
| | | | This frees all the current dependencies on the depth uniform.
* Made depth tested renderText() work after stencil clipping change.Samuel Rødal2009-10-061-7/+10
| | | | Also we should force Raster_A8 glyph format in renderText().
* Added convex polygon optimization to QGL2PaintEngineExPrivate::fill().Samuel Rødal2009-10-061-5/+4
|
* Switched to using stencil instead of depth buffer for clipping.Samuel Rødal2009-10-061-106/+171
| | | | | Based on Aaron Kennedy's patch. All tests are green, but when enabling scissoring UniteClip seems to be broken atm.
* Moved GL 2 clip clearing code into a common function.Samuel Rødal2009-10-061-14/+14
|
* Got rid of some redundant state changes regarding GL depth state.Samuel Rødal2009-10-061-14/+9
|
* Renamed GL 2 engine variables to be clip buffer agnostic.Samuel Rødal2009-10-061-45/+45
|
* Switched to using GL_LEQUAL instead of GL_LESS in GL 2 engine.Samuel Rødal2009-10-061-10/+11
|
* Made GL 2 paint engine waste less bits in clipping algorithm.Samuel Rødal2009-10-061-5/+4
|
* Refactored GL 2 engine UniteClip to always increase max depth.Samuel Rødal2009-10-061-3/+2
|
* Moved maxDepth out of state object and got rid of unused state members.Samuel Rødal2009-10-061-11/+8
|
* Fixed missing stencil buffer clear when scissor testing is disabled.Samuel Rødal2009-10-061-1/+3
|
* Fixed bug in GL 2 engine when using beginNativePainting.Samuel Rødal2009-10-061-0/+2
| | | | | | | Need to set shader manager to dirty in case we change the shader program using native calls. Reviewed-by: Trond
* Consistently use QGLShareContextScope for context switchingRhys Weatherley2009-10-051-5/+1
| | | | | | | | QGLShareContextScope is safer and more reliable than trying to manually detect how and when to temporarily switch contexts. Replace the few remaining instances of context-switching with it. Reviewed-by: trustme
* Changed implementation of qDrawBorderPixmap() to use qDrawPixmaps().Kim Motoyoshi Kalland2009-10-021-7/+11
| | | | Reviewed-by: Trond
* Added support for drawing a pixmap multiple times in one call.Kim Motoyoshi Kalland2009-10-021-19/+122
| | | | | | | | | This is internal API. It's possible to specify a horizontal and vertical scale, rotation, opacity and source rectangle for each pixmap item. Useful for particle effects. Reviewed-by: Trond
* Fix warnings on mingwThierry Bastian2009-10-011-0/+1
| | | | Reviewed-by: trust me
* Fixed a crash in the boxes demo when using -graphicssystem opengl.Trond Kjernaasen2009-09-281-1/+1
| | | | | | | | | | | | Several problems: 1. The demo leaked the scene contents, which caused cleanup problems. 2. The QGLContext::currentContext() could be changed behind Qt's back under Windows (the temp contexts never reset the current context). 3. QGLFormat::openGLVersionFlags() function would return uninitialized flags if the QGLWidget constructor happened to call qt_gl_preferGL2Engine(). Reviewed-by: Kim
* Suppress some compiler warnings that occur under OpenGL/ES 2.0Rhys Weatherley2009-09-281-0/+4
| | | | Reviewed-by: trustme
* Added #define to GL 2 paint engine to turn off scissor testing.Samuel Rødal2009-09-251-15/+27
| | | | Reviewed-by: Gunnar Sletta
* Added a comment to clarify the purpose of a piece of code.Trond Kjernåsen2009-09-231-1/+1
| | | | Reviewed-by: Trust Me
* Fixed a warning.Trond Kjernåsen2009-09-221-0/+2
| | | | Reviewed-by: Kim
* Fixed text drawing in the GL2 engine after sub-pixel hinting was added.Trond Kjernåsen2009-09-221-18/+28
| | | | | | | | | | 1. The mono format was not handled at all. 2. We really, really wanted to use sub-pixel hinted glyphs even when they were not available. 3. The glyphFormat type in the FT font engine wasn't updated to reflect the correct system glyph type. Reviewed-by: Kim
* Resubmit support for subpixel antialiasing on text in the GL2 engine.Kim Motoyoshi Kalland2009-09-221-17/+125
| | | | | | | The antialiasing is currently not gamma corrected and is disabled on OpenGL ES 2.0. Reviewed-by: Samuel
* Revert "Resubmit support for subpixel antialiasing on text in the GL2 engine."Rhys Weatherley2009-09-211-125/+17
| | | | This reverts commit 1b34feacef7a2d3ac005449a7cfbcb08a6bbf947.