diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-12-17 14:34:16 +0100 |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-12-17 15:52:11 +0100 |
commit | ca30ced65ead8e81dfcb25178f4bfb6244487356 (patch) | |
tree | 8640fbed5ca182e7cf222a164457cc9d3635773d /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | |
parent | 7698c6d25fb1e017a84ec67c08eb4c3dc3568515 (diff) |
GL2Engine: Don't mark brush as dirty if it hasn't changed
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
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index 77ca3a86f0..33ce24da46 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -171,7 +171,6 @@ public: q(q_ptr), width(0), height(0), ctx(0), - currentBrush(0), inverseScale(1), shaderManager(0), inRenderText(false) @@ -185,7 +184,7 @@ public: void updateCompositionMode(); void updateTextureFilter(GLenum target, GLenum wrapMode, bool smoothPixmapTransform, GLuint id = -1); - void setBrush(const QBrush* brush); + void setBrush(const QBrush& brush); void transferMode(EngineMode newMode); void resetGLState(); @@ -244,7 +243,7 @@ public: QRect currentScissorBounds; uint maxClip; - const QBrush* currentBrush; // May not be the state's brush! + QBrush currentBrush; // May not be the state's brush! GLfloat inverseScale; |