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

Unified Diff: cc/trees/thread_proxy.cc

Issue 1297363004: cc: Move animate steps from proxies to LayerTreeHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moveanimatecodetolthi: . Created 5 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
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.h ('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 ba1f9465d47d0b3d0de706e3868456fc13aba0d7..385fcb4b3d362fe946fd095b21db09200ee2865a 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -851,22 +851,7 @@ void ThreadProxy::ScheduledActionAnimate() {
TRACE_EVENT0("cc", "ThreadProxy::ScheduledActionAnimate");
DCHECK(IsImplThread());
- // Don't animate if there is no root layer.
- // TODO(mithro): Both Animate and UpdateAnimationState already have a
- // "!active_tree_->root_layer()" check?
- if (!impl().layer_tree_host_impl->active_tree()->root_layer()) {
- return;
- }
-
- impl().animation_time =
- impl().layer_tree_host_impl->CurrentBeginFrameArgs().frame_time;
- impl().layer_tree_host_impl->Animate(impl().animation_time);
-
- // If animations are not visible, update the state now as
- // ScheduledActionDrawAndSwapIfPossible will never be called.
- if (!impl().layer_tree_host_impl->AnimationsAreVisible()) {
- impl().layer_tree_host_impl->UpdateAnimationState(true);
- }
+ impl().layer_tree_host_impl->Animate();
}
void ThreadProxy::ScheduledActionCommit() {
« cc/trees/layer_tree_host_impl.cc ('K') | « cc/trees/thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698