diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-18 10:41:42 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-18 10:41:42 (GMT) |
commit | c8f43775f1902a0539743446b5fdbb1019ccf209 (patch) | |
tree | fc42e041f10fa2364a3a23e029a944105c77ac02 /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | |
parent | 60f3e3abbb9bfd61448a761701159cf880e66c19 (diff) | |
download | Qt-c8f43775f1902a0539743446b5fdbb1019ccf209.zip Qt-c8f43775f1902a0539743446b5fdbb1019ccf209.tar.gz Qt-c8f43775f1902a0539743446b5fdbb1019ccf209.tar.bz2 |
Optimization for text drawing on OpenGL
Only call glBindTexture() if the glyph cache texture is not already
bound. This can potentially give performance improvement of around 30%.
Reviewed-by: Gunnar
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index c60eac1..7108741 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -176,7 +176,8 @@ public: useSystemClip(true), snapToPixelGrid(false), addOffset(false), - inverseScale(1) + inverseScale(1), + lastMaskTextureUsed(0) { } ~QGL2PaintEngineExPrivate(); @@ -278,6 +279,7 @@ public: GLfloat inverseScale; GLuint lastTextureUsed; + GLuint lastMaskTextureUsed; bool needsSync; bool multisamplingAlwaysEnabled; |