summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-09-28 04:59:23 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-09-28 04:59:23 (GMT)
commit3a927312dbb797f03b351067210b83784c7132cb (patch)
tree1ab3f32db3c454c1822b39bcd89be322e43fa80f /src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
parent8f9ef5ca1cd24bf74004c8b12e4025b72ec7548b (diff)
downloadQt-3a927312dbb797f03b351067210b83784c7132cb.zip
Qt-3a927312dbb797f03b351067210b83784c7132cb.tar.gz
Qt-3a927312dbb797f03b351067210b83784c7132cb.tar.bz2
Minimize parameter changes on glyph cache textures
Cache the last set filtering mode on glyph textures and update only when necessary. Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index eb3693c..e22146d 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -83,6 +83,12 @@ public:
inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; }
+ enum FilterMode {
+ Nearest,
+ Linear
+ };
+ FilterMode filterMode() const { return m_filterMode; }
+ void setFilterMode(FilterMode m) { m_filterMode = m; }
public Q_SLOTS:
void contextDestroyed(const QGLContext *context) {
@@ -117,6 +123,8 @@ private:
int m_height;
QGLShaderProgram *m_program;
+
+ FilterMode m_filterMode;
};
QT_END_NAMESPACE