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

Unified Diff: cc/trees/thread_proxy.cc

Issue 653013002: Revert of Making scheduler run ANIMATE after a COMMIT (instead of LayerTreeHostImpl). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.cc
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 93b4c65f5fa19e7b1e358462cd93ca4489b7e43c..57837096ee9bc92988dbe65d68391dfe830b16d1 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -108,6 +108,7 @@
inside_draw(false),
input_throttled_until_commit(false),
animations_frozen_until_next_draw(false),
+ did_commit_after_animating(false),
smoothness_priority_expiration_notifier(
proxy->ImplThreadTaskRunner(),
base::Bind(&ThreadProxy::RenewTreePriority, base::Unretained(proxy)),
@@ -943,6 +944,7 @@
impl().layer_tree_host_impl->CurrentBeginFrameArgs().frame_time;
}
impl().layer_tree_host_impl->Animate(impl().animation_time);
+ impl().did_commit_after_animating = false;
}
void ThreadProxy::ScheduledActionCommit() {
@@ -960,6 +962,7 @@
impl().animation_time = std::max(
impl().animation_time, blocked_main().last_monotonic_frame_begin_time);
}
+ impl().did_commit_after_animating = true;
blocked_main().main_thread_inside_commit = true;
impl().layer_tree_host_impl->BeginCommit();
@@ -1027,6 +1030,11 @@
impl().timing_history.DidStartDrawing();
base::AutoReset<bool> mark_inside(&impl().inside_draw, true);
+
+ if (impl().did_commit_after_animating) {
+ impl().layer_tree_host_impl->Animate(impl().animation_time);
+ impl().did_commit_after_animating = false;
+ }
if (impl().layer_tree_host_impl->pending_tree())
impl().layer_tree_host_impl->pending_tree()->UpdateDrawProperties();
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698