Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp

Issue 10836250: Merge 125577 - [chromium] race between CCLayerTreeHostImpl::releaseContentsTextures and CCThreadPro… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (revision 125598)
+++ Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp (working copy)
@@ -122,7 +122,7 @@
, m_settings(settings)
, m_deviceScaleFactor(1)
, m_visible(true)
- , m_contentsTexturesWerePurgedSinceLastCommit(false)
+ , m_contentsTexturesPurged(false)
, m_memoryAllocationLimitBytes(CCPrioritizedTextureManager::defaultMemoryAllocationLimit())
, m_pageScale(1)
, m_pageScaleDelta(1)
@@ -159,7 +159,6 @@
// Recompute max scroll position; must be after layer content bounds are
// updated.
updateMaxScrollPosition();
- m_contentsTexturesWerePurgedSinceLastCommit = false;
}
bool CCLayerTreeHostImpl::canDraw()
@@ -176,7 +175,7 @@
TRACE_EVENT_INSTANT0("cc", "CCLayerTreeHostImpl::canDraw no layerRenderer");
return false;
}
- if (m_contentsTexturesWerePurgedSinceLastCommit) {
+ if (m_contentsTexturesPurged) {
TRACE_EVENT_INSTANT0("cc", "CCLayerTreeHostImpl::canDraw contents textures purged");
return false;
}
@@ -519,8 +518,10 @@
void CCLayerTreeHostImpl::releaseContentsTextures()
{
+ if (m_contentsTexturesPurged)
+ return;
m_resourceProvider->deleteOwnedResources(CCRenderer::ContentPool);
- m_contentsTexturesWerePurgedSinceLastCommit = true;
+ m_contentsTexturesPurged = true;
m_client->setNeedsCommitOnImplThread();
}

Powered by Google App Engine
This is Rietveld 408576698