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

Unified Diff: cc/layer_tree_host.cc

Issue 11886091: cc: Fix resource eviction with impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix enforceManagedMemoryPolicy. It's possible we have pending tree when this is called. Created 7 years, 11 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
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index 9ee1e4201c118f7560f89e57d6d8882ee475480d..3fcfad2aca1cc855693a71a861be4f5fc610820a 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -254,6 +254,10 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl)
{
DCHECK(m_proxy->isImplThread());
+ // If there are linked evicted backings, these backings' resources may be put into the
+ // impl tree, so we can't draw yet. Determine this before clearing all evicted backings.
+ bool newImplTreeHasNoEvictedResources = !m_contentsTextureManager->linkedEvictedBackingsExist();
+
m_contentsTextureManager->updateBackingsInDrawingImplTree();
m_contentsTextureManager->reduceMemory(hostImpl->resourceProvider());
@@ -300,6 +304,11 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl)
hostImpl->setDebugState(m_debugState);
hostImpl->savePaintTime(m_renderingStats.totalPaintTime);
+ if (newImplTreeHasNoEvictedResources) {
+ if (syncTree->ContentsTexturesPurged())
+ syncTree->ResetContentsTexturesPurged();
+ }
+
m_commitNumber++;
}
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698