Index: cc/CCSingleThreadProxy.cpp |
diff --git a/cc/CCSingleThreadProxy.cpp b/cc/CCSingleThreadProxy.cpp |
index 6ac4990c50ba74d2178ba8978f4672806ac14ccf..f6d4f67f1a9cb60c058611abbc39c5f57cc775e2 100644 |
--- a/cc/CCSingleThreadProxy.cpp |
+++ b/cc/CCSingleThreadProxy.cpp |
@@ -134,6 +134,7 @@ bool CCSingleThreadProxy::recreateContext() |
bool initialized; |
{ |
+ DebugScopedSetMainThreadBlocked mainThreadBlocked; |
DebugScopedSetImplThread impl; |
if (!m_layerTreeHostImpl->contentsTexturesPurged()) |
m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider()); |
@@ -276,12 +277,14 @@ bool CCSingleThreadProxy::commitAndComposite() |
{ |
ASSERT(CCProxy::isMainThread()); |
- |
if (!m_layerTreeHost->initializeRendererIfNeeded()) |
return false; |
- if (m_layerTreeHostImpl->contentsTexturesPurged()) |
- m_layerTreeHost->evictAllContentTextures(); |
+ if (m_layerTreeHostImpl->contentsTexturesPurged()) { |
+ m_layerTreeHost->unlinkAllContentTextures(); |
+ DebugScopedSetImplThreadAndMainThreadBlocked implAndMainBlocked; |
+ m_layerTreeHost->deleteUnlinkedTextures(); |
+ } |
CCTextureUpdateQueue queue; |
m_layerTreeHost->updateLayers(queue, m_layerTreeHostImpl->memoryAllocationLimitBytes()); |