diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-05-10 20:41:09 (GMT) |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-06-09 10:31:54 (GMT) |
commit | 489baff3d49f7acce8d36dd98d27885ca207d6e7 (patch) | |
tree | f9b7a0decd67048b52c0513b7665ccd46135a8ce /src/opengl/qgl_p.h | |
parent | 7b0762c17f9899e68c0f67480a81b25c6f0c7dda (diff) | |
download | Qt-489baff3d49f7acce8d36dd98d27885ca207d6e7.zip Qt-489baff3d49f7acce8d36dd98d27885ca207d6e7.tar.gz Qt-489baff3d49f7acce8d36dd98d27885ca207d6e7.tar.bz2 |
Simplify texture pooling logic in GL graphics system.
Remove ugly TemporarilyCachedBindOption and use QGLTexture
objects as texture pool entries instead of QGLPixmapData.
Make texture pooling totally Symbian specific, remove
VG like texture pooling code and use common texture binding
path which is used on other platforms also on Symbian.
QGLPixmapData should be only used to bind SgImage based
textures (will be implemented by another commit).
Task-number: QTBUG-19180
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r-- | src/opengl/qgl_p.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index f64c65b..2fb7e58 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -64,6 +64,12 @@ #include "qcache.h" #include "qglpaintdevice_p.h" +#ifdef Q_OS_SYMBIAN +#include "qgltexturepool_p.h" + +class QGLPixmapData; +#endif + #ifndef QT_NO_EGL #include <QtGui/private/qegl_p.h> #endif @@ -540,6 +546,14 @@ public: options(opt) #if defined(Q_WS_X11) , boundPixmap(0) +#elif defined(Q_OS_SYMBIAN) + , boundPixmap(0) + , boundKey(0) + , nextLRU(0) + , prevLRU(0) + , inLRU(false) + , failedToAlloc(false) + , inTexturePool(false) #endif {} @@ -551,7 +565,7 @@ public: #endif context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id); } - } + } QGLContext *context; GLuint id; @@ -571,6 +585,17 @@ public: (const char *buf, int len, const char *format = 0); QSize bindCompressedTextureDDS(const char *buf, int len); QSize bindCompressedTexturePVR(const char *buf, int len); + +#ifdef Q_OS_SYMBIAN + QGLPixmapData* boundPixmap; + qint64 boundKey; + + QGLTexture *nextLRU; + QGLTexture *prevLRU; + mutable bool inLRU; + mutable bool failedToAlloc; + mutable bool inTexturePool; +#endif }; struct QGLTextureCacheKey { |