diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-06-09 13:52:49 (GMT) |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-06-09 13:52:49 (GMT) |
commit | 06588b7704a4bd41b558a0abe611f3490b6f17e6 (patch) | |
tree | 760c107d71f70967a5c6e9a18bfba39e3198f6f2 /src | |
parent | 57092a111a314a3cafdbc5d8302cf716b6bbda36 (diff) | |
download | Qt-06588b7704a4bd41b558a0abe611f3490b6f17e6.zip Qt-06588b7704a4bd41b558a0abe611f3490b6f17e6.tar.gz Qt-06588b7704a4bd41b558a0abe611f3490b6f17e6.tar.bz2 |
Add missing freeTexture() from fix for QTBUG-19180
Task-number: QTBUG-19180
Reviewed-by: TRUSTME
Diffstat (limited to 'src')
-rw-r--r-- | src/opengl/qgl.cpp | 22 | ||||
-rw-r--r-- | src/opengl/qgl_p.h | 6 |
2 files changed, 28 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 6248cfe..4fee886 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -5902,4 +5902,26 @@ QSize QGLTexture::bindCompressedTexturePVR(const char *buf, int len) #undef ctx +#ifdef Q_OS_SYMBIAN +void QGLTexture::freeTexture() +{ + if (!id) + return; + + if (inTexturePool) + QGLTexturePool::instance()->detachTexture(this); + + if (boundPixmap) + boundPixmap->releaseNativeImageHandle(); + + if (options & QGLContext::MemoryManagedBindOption) { + Q_ASSERT(context); + context->d_ptr->texture_destroyer->emitFreeTexture(context, 0, id); + } + + id = 0; + boundKey = 0; +} +#endif + QT_END_NAMESPACE diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 2fb7e58..2ca8dc9 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -558,6 +558,9 @@ public: {} ~QGLTexture() { +#ifdef Q_OS_SYMBIAN + freeTexture(); +#else if (options & QGLContext::MemoryManagedBindOption) { Q_ASSERT(context); #if !defined(Q_WS_X11) @@ -565,6 +568,7 @@ public: #endif context->d_ptr->texture_destroyer->emitFreeTexture(context, boundPixmap, id); } +#endif } QGLContext *context; @@ -587,6 +591,8 @@ public: QSize bindCompressedTexturePVR(const char *buf, int len); #ifdef Q_OS_SYMBIAN + void freeTexture(); + QGLPixmapData* boundPixmap; qint64 boundKey; |