diff options
author | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-03-22 09:03:13 (GMT) |
---|---|---|
committer | Jani Hautakangas <jani.hautakangas@nokia.com> | 2011-03-22 09:46:25 (GMT) |
commit | 48c5a020c6ad6ee5ef1721d422f10bbc40dd1557 (patch) | |
tree | 2efc4cf4ab3fb56cc5f989aa65167f60cdf35798 /src/opengl/qgltexturepool.cpp | |
parent | de4bd221124e0a133858839b4b824165a9eb7dff (diff) | |
download | Qt-48c5a020c6ad6ee5ef1721d422f10bbc40dd1557.zip Qt-48c5a020c6ad6ee5ef1721d422f10bbc40dd1557.tar.gz Qt-48c5a020c6ad6ee5ef1721d422f10bbc40dd1557.tar.bz2 |
Change Symbian to use destroyed swap behaviour in GL
Destroyed swap behaviour is a little bit faster than
preserved swap with heavily animated UIs like QML.
Task-number: QTBUG-18270
Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/opengl/qgltexturepool.cpp')
-rw-r--r-- | src/opengl/qgltexturepool.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opengl/qgltexturepool.cpp b/src/opengl/qgltexturepool.cpp index 61a88c3..a5472ec 100644 --- a/src/opengl/qgltexturepool.cpp +++ b/src/opengl/qgltexturepool.cpp @@ -135,8 +135,11 @@ void QGLTexturePool::releaseTexture(QGLPixmapData *data, GLuint texture) if (data) removeFromLRU(data); - QGLShareContextScope ctx(qt_gl_share_widget()->context()); - glDeleteTextures(1, &texture); + QGLWidget *shareWidget = qt_gl_share_widget(); + if (shareWidget) { + QGLShareContextScope ctx(shareWidget->context()); + glDeleteTextures(1, &texture); + } } void QGLTexturePool::useTexture(QGLPixmapData *data) |