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

Unified Diff: cc/trees/single_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
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index bf03378246811e78226c911a557a513f4843223d..7c30bfcd360c9c4d554f6bff000e790bc60a8bb7 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -201,24 +201,6 @@ void SingleThreadProxy::SetNeedsUpdateLayers() {
SetNeedsCommit();
}
-void SingleThreadProxy::DoAnimate() {
- // Don't animate if there is no root layer.
- // TODO(mithro): Both Animate and UpdateAnimationState already have a
- // "!active_tree_->root_layer()" check?
- if (!layer_tree_host_impl_->active_tree()->root_layer()) {
- return;
- }
-
- layer_tree_host_impl_->Animate(
- layer_tree_host_impl_->CurrentBeginFrameArgs().frame_time);
-
- // If animations are not visible, update the animation state now as it
- // won't happen in DoComposite.
- if (!layer_tree_host_impl_->AnimationsAreVisible()) {
- layer_tree_host_impl_->UpdateAnimationState(true);
- }
-}
-
void SingleThreadProxy::DoCommit() {
TRACE_EVENT0("cc", "SingleThreadProxy::DoCommit");
DCHECK(Proxy::IsMainThread());
@@ -593,7 +575,8 @@ void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
layer_tree_host_impl_->PrepareTiles();
layer_tree_host_impl_->SynchronouslyInitializeAllTiles();
- DoAnimate();
+ // TODO(danakj): Don't do this last... we prepared the wrong things. D:
+ layer_tree_host_impl_->Animate();
LayerTreeHostImpl::FrameData frame;
DoComposite(&frame);
@@ -881,7 +864,7 @@ void SingleThreadProxy::ScheduledActionCommit() {
void SingleThreadProxy::ScheduledActionAnimate() {
TRACE_EVENT0("cc", "ScheduledActionAnimate");
DebugScopedSetImplThread impl(this);
- DoAnimate();
+ layer_tree_host_impl_->Animate();
}
void SingleThreadProxy::ScheduledActionActivateSyncTree() {

Powered by Google App Engine
This is Rietveld 408576698