summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-09-09 00:36:18 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-09-09 00:36:18 (GMT)
commitbff0ea73ea4316b915d087d1e01a3c617a769789 (patch)
tree5a3ba754da2b191567499adb8761d608a86ea27f
parent381c17536c4fdf1a7fc3ee47c7d1d29cdce4b1f2 (diff)
downloadQt-bff0ea73ea4316b915d087d1e01a3c617a769789.zip
Qt-bff0ea73ea4316b915d087d1e01a3c617a769789.tar.gz
Qt-bff0ea73ea4316b915d087d1e01a3c617a769789.tar.bz2
Clean up the gradient cache in the right context
QGLGradientCache for the OpenGL1 paint engine has to destroy the cached gradient textures if the QGLContext changes. Problem is, it wasn't changing back to the previous context to destroy those textures. Task-number: 249919 Reviewed-by: Sarah Smith
-rw-r--r--src/opengl/qpaintengine_opengl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 34fff10..bb610431 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -1077,6 +1077,7 @@ protected:
}
void cleanCache() {
+ QGLShareContextScope scope(buffer_ctx);
QGLGradientColorTableHash::const_iterator it = cache.constBegin();
for (; it != cache.constEnd(); ++it) {
const CacheInfo &cache_info = it.value();