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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 12211143: cc: Prevent premature activation during prefer smoothness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index e357999dcb264deb268a5c190e8f2662127359c6..06db701f3a9279b63d86d5ec7fdfe06c9e84883a 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -972,11 +972,19 @@ void LayerTreeHostImpl::activatePendingTreeIfNeeded()
// activate once all visible resources in pending tree are ready
// or tile manager has no work scheduled for pending tree.
if (activeTree()->RootLayer() &&
- !pendingTree()->AreVisibleResourcesReady() &&
- m_tileManager->HasPendingWorkScheduled(PENDING_TREE)) {
- TRACE_EVENT_ASYNC_STEP0("cc",
- "PendingTree", m_pendingTree.get(), "waiting");
- return;
+ !pendingTree()->AreVisibleResourcesReady()) {
+ // In smoothness takes priority mode, the pending tree's priorities are
+ // ignored, so the tile manager may not have work for it even though it
+ // is simultaneously not ready to be activated.
+ if (m_tileManager->GlobalState().tree_priority ==
+ SMOOTHNESS_TAKES_PRIORITY ||
+ m_tileManager->HasPendingWorkScheduled(PENDING_TREE)) {
+ TRACE_EVENT_ASYNC_STEP0("cc",
+ "PendingTree",
+ m_pendingTree.get(),
+ "waiting");
+ return;
+ }
}
activatePendingTree();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698