diff options
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; |