summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-11-13 17:37:02 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-14 10:38:08 +0100
commitdef5fef7fbf7fedece54d52188f75a90616599a4 (patch)
tree0c3b41456da24b4b11124a5de3f76841fbcaea13
parente4dabe7b30eae0642a2d7cf18a074beb7cb182ad (diff)
Clear a stray ref on layers when purging GL resourcesv5.4.0-rc1
Fix a regression of 3df57f7e550a19cb4450ed3896aa51ddb38c2ed2 where a reference to TextureMapperBackingStore would be kept in the TextureMapperLayers after purgeGLResources(). This would crash later on if the window would get destroyed before the CoordinatedGraphicsScene that own those layers. Task-number: QTBUG-40734 Change-Id: Id1a596c0f0ba9afd1e163f83c38dda939f521314 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
index acd382cdb..b9709136d 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
@@ -694,6 +694,10 @@ void CoordinatedGraphicsScene::purgeGLResources()
m_backingStores.clear();
m_backingStoresWithPendingBuffers.clear();
+ LayerMap::iterator end = m_layers.end();
+ for (LayerMap::iterator it = m_layers.begin(); it != end; ++it)
+ it->value->setBackingStore(0);
+
setActive(false);
dispatchOnMainThread(bind(&CoordinatedGraphicsScene::purgeBackingStores, this));
}