summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some compiler warnings.Samuel Rødal2009-11-031-7/+2
| | | | Reviewed-by: Trond
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6Gunnar Sletta2009-11-021-0/+1
|\
| * Optimized animated blur radii in the GL 2 paint engine.Samuel Rødal2009-11-021-0/+1
| | | | | | | | | | | | | | | | | | We add an internal cache which keeps four half-scaled versions of the source pixmap at different blur radii, then we simply interpolate between the two pixmaps around the desired blur radius, or between the base source pixmap and the first blurred version. Reviewed-by: Gunnar Sletta
* | Better cosmetic pen scaling for beziers in tristroker.Gunnar Sletta2009-11-021-1/+1
| | | | | | | | Reviewed-By: Samuel
* | Safeguard isNull() pixmaps in bindTexture and remove a compile warningGunnar Sletta2009-11-021-1/+1
|/ | | | Reviewed-by: TrustMe
* Implement a simple caching algorithm for shader programs.Tom Cooksey2009-10-302-31/+53
| | | | | | | | | | When the number of programs held in the cache exceeds a threshold, the least frequantly used programs get deleted. This also covers programs with custom snippets of code. As a conequence, when a QGLCustomShaderStage gets deleted, any programs using that code will (eventually) be freed. Reviewed-By: Samuel Rødal
* Rename qglEngineShaderSourceCode to qShaderSnippetsTom Cooksey2009-10-302-71/+93
| | | | This patch also adds a "snippetNameStr" helper for debugging.
* Refactor of shader manager to not use partial shadersTom Cooksey2009-10-304-217/+211
| | | | | | | | | This is a first step towards supporting binary shaders. Note: This change will introduce a (rare) leak of shader objects, as the shaders will never be kicked out from the cache (because the cache is still a QList) :-) This will be corrected by the next patch. Reviewed-By: Samuel
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-302-0/+6
|\
| * Fix namespace buildRichard Moe Gustavsen2009-10-282-0/+6
| | | | | | | | | | | | Looks like a couple of files missed the namespace macro... Rev-By: gunnar
* | Added some optimizations to the blur and drop shadow GL filters.Samuel Rødal2009-10-293-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Kill a tiny few sin/cos/sqrt calls in the new strokerGunnar Sletta2009-10-262-3/+12
|/ | | | Reviewed-by: Eskil
* Suppress warnings in QtOpenGL codeRhys Weatherley2009-10-261-0/+1
|
* Added license headers to new filesGunnar Sletta2009-10-222-0/+82
|
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-221-1/+1
|\ | | | | | | | | Conflicts: src/gui/painting/qtextureglyphcache.cpp
| * Fix dangling shader manager pointersJulian de Bhal2009-10-201-1/+1
| | | | | | | | | | | | | | | | | | The QGLEngineShaderManager pointers in QGLCustomShaderStagePrivate have been changed to QPointers to prevent the QGLPixmapFilters in QGL2PaintEngineEx from dereferencing the QGLEngineShaderManager after it is destroyed. Reviewed-by: Rhys Weatherley
* | Integrated new triangulating stroker into QtGunnar Sletta2009-10-194-52/+726
|/
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-192-13/+15
|\
| * Fix save() and restore() for the OpenGL2 paint engine.Rhys Weatherley2009-10-122-13/+15
| | | | | | | | | | | | Task-number: QTBUG-4822, QTBUG-4824 Reviewed-by: Sarah Smith Reviewed-by: Samuel
* | Fixed upside down brush patterns in the OpenGL paint engines.Kim Motoyoshi Kalland2009-10-141-1/+0
| | | | | | | | | | Task-number: QTBUG-2222 Reviewed-by: Gunnar
* | 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-073-5/+43
| | | | | | | | | | | | 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-072-29/+41
| | | | | | | | | | | | | 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
* Fix compilation with -pedanticDavid Faure2009-10-071-1/+1
| | | | | Merge-request: 1716 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Optimized restore() in GL 2 paint engine.Samuel Rødal2009-10-062-19/+46
| | | | | | | 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-062-16/+30
| | | | 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-062-121/+173
| | | | | 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-062-14/+15
|
* 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-062-52/+52
|
* 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-062-14/+9
|
* 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
* Implement the drop shadow filter for OpenGLRhys Weatherley2009-10-051-0/+2
| | | | | Task-number: QTBUG-4583 Reviewed-by: trustme
* Consistently use QGLShareContextScope for context switchingRhys Weatherley2009-10-053-15/+3
| | | | | | | | 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-022-8/+12
| | | | Reviewed-by: Trond
* Added support for drawing a pixmap multiple times in one call.Kim Motoyoshi Kalland2009-10-025-45/+197
| | | | | | | | | 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
* Use QGLSharedResourceGuard to track contexts in the shader managerRhys Weatherley2009-10-012-5/+5
| | | | Reviewed-by: Sarah Smith
* 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
* Made fast blur in GL 2 engine be radius independent.Samuel Rødal2009-09-241-0/+1
| | | | | | | | | | | This is useful when animating the blur radius, as you don't want to suffer the hit of compiling / linking a new shader program for each radius the first time the animation is played. Also use the fast blur when the radius is 5 or below, as the quality difference is insignificant. Reviewed-by: Rhys Weatherley
* Added a comment to clarify the purpose of a piece of code.Trond Kjernåsen2009-09-231-1/+1
| | | | Reviewed-by: Trust Me