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

Unified Diff: cc/layer_tree_host.cc

Issue 12094094: cc: Don't do full tree sync unless needed with impl painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.cc » ('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 a6e2a76179913ae4edee0ed72f7d5a19e2aae2b5..1b54271e1f472ccef45c65eb87400663f9514686 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -265,27 +265,23 @@ void LayerTreeHost::finishCommitOnImplThread(LayerTreeHostImpl* hostImpl)
// time to raster before being displayed. If no pending tree is needed,
// synchronization can happen directly to the active tree.
LayerTreeImpl* syncTree;
- bool needsFullTreeSync = false;
if (m_settings.implSidePainting) {
// Commits should not occur while there is already a pending tree.
DCHECK(!hostImpl->pendingTree());
hostImpl->createPendingTree();
syncTree = hostImpl->pendingTree();
- // TODO(enne): we could recycle old active trees and keep track for
- // multiple main thread frames whether a sync is needed
- needsFullTreeSync = true;
} else {
syncTree = hostImpl->activeTree();
- needsFullTreeSync = m_needsFullTreeSync;
}
- if (needsFullTreeSync)
+ if (m_needsFullTreeSync)
syncTree->SetRootLayer(TreeSynchronizer::synchronizeTrees(rootLayer(), syncTree->DetachLayerTree(), syncTree));
{
TRACE_EVENT0("cc", "LayerTreeHost::pushProperties");
TreeSynchronizer::pushProperties(rootLayer(), syncTree->RootLayer());
}
+ syncTree->set_needs_full_tree_sync(m_needsFullTreeSync);
m_needsFullTreeSync = false;
if (m_rootLayer && m_hudLayer)
« no previous file with comments | « no previous file | cc/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698