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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 1881373002: CC Animation: Erase AnimationRegistrar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@private
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_); 275 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_);
276 276
277 if (input_handler_client_) { 277 if (input_handler_client_) {
278 input_handler_client_->WillShutdown(); 278 input_handler_client_->WillShutdown();
279 input_handler_client_ = NULL; 279 input_handler_client_ = NULL;
280 } 280 }
281 if (scroll_elasticity_helper_) 281 if (scroll_elasticity_helper_)
282 scroll_elasticity_helper_.reset(); 282 scroll_elasticity_helper_.reset();
283 283
284 // The layer trees must be destroyed before the layer tree host. We've 284 // The layer trees must be destroyed before the layer tree host. We've
285 // made a contract with our animation controllers that the registrar 285 // made a contract with our animation controllers that the animation_host
286 // will outlive them, and we must make good. 286 // will outlive them, and we must make good.
287 if (recycle_tree_) 287 if (recycle_tree_)
288 recycle_tree_->Shutdown(); 288 recycle_tree_->Shutdown();
289 if (pending_tree_) 289 if (pending_tree_)
290 pending_tree_->Shutdown(); 290 pending_tree_->Shutdown();
291 active_tree_->Shutdown(); 291 active_tree_->Shutdown();
292 recycle_tree_ = nullptr; 292 recycle_tree_ = nullptr;
293 pending_tree_ = nullptr; 293 pending_tree_ = nullptr;
294 active_tree_ = nullptr; 294 active_tree_ = nullptr;
295 295
(...skipping 3154 matching lines...) Expand 10 before | Expand all | Expand 10 after
3450 return animated; 3450 return animated;
3451 } 3451 }
3452 3452
3453 bool LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time) { 3453 bool LayerTreeHostImpl::AnimateLayers(base::TimeTicks monotonic_time) {
3454 const bool animated = animation_host_->AnimateLayers(monotonic_time); 3454 const bool animated = animation_host_->AnimateLayers(monotonic_time);
3455 3455
3456 // TODO(crbug.com/551134): Only do this if the animations are on the active 3456 // TODO(crbug.com/551134): Only do this if the animations are on the active
3457 // tree, or if they are on the pending tree waiting for some future time to 3457 // tree, or if they are on the pending tree waiting for some future time to
3458 // start. 3458 // start.
3459 // TODO(crbug.com/551138): We currently have a single signal from the 3459 // TODO(crbug.com/551138): We currently have a single signal from the
3460 // animation host/registrar, so on the last frame of an animation we will 3460 // animation_host, so on the last frame of an animation we will
3461 // still request an extra SetNeedsAnimate here. 3461 // still request an extra SetNeedsAnimate here.
3462 if (animated) 3462 if (animated)
3463 SetNeedsOneBeginImplFrame(); 3463 SetNeedsOneBeginImplFrame();
3464 // TODO(crbug.com/551138): We could return true only if the animations are on 3464 // TODO(crbug.com/551138): We could return true only if the animations are on
3465 // the active tree. There's no need to cause a draw to take place from 3465 // the active tree. There's no need to cause a draw to take place from
3466 // animations starting/ticking on the pending tree. 3466 // animations starting/ticking on the pending tree.
3467 return animated; 3467 return animated;
3468 } 3468 }
3469 3469
3470 void LayerTreeHostImpl::UpdateAnimationState(bool start_ready_animations) { 3470 void LayerTreeHostImpl::UpdateAnimationState(bool start_ready_animations) {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
3976 return task_runner_provider_->HasImplThread(); 3976 return task_runner_provider_->HasImplThread();
3977 } 3977 }
3978 3978
3979 bool LayerTreeHostImpl::CommitToActiveTree() const { 3979 bool LayerTreeHostImpl::CommitToActiveTree() const {
3980 // In single threaded mode we skip the pending tree and commit directly to the 3980 // In single threaded mode we skip the pending tree and commit directly to the
3981 // active tree. 3981 // active tree.
3982 return !task_runner_provider_->HasImplThread(); 3982 return !task_runner_provider_->HasImplThread();
3983 } 3983 }
3984 3984
3985 } // namespace cc 3985 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698