From bff0ea73ea4316b915d087d1e01a3c617a769789 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 9 Sep 2009 10:36:18 +1000 Subject: 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 --- src/opengl/qpaintengine_opengl.cpp | 1 + 1 file changed, 1 insertion(+) 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(); -- cgit v0.12