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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 1877073006: CC Animation: Make AnimationRegistrar a private member of AnimationHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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/test/animation_timelines_test_common.cc ('k') | cc/trees/layer_tree_host.h » ('j') | 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/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
11 #include "base/thread_task_runner_handle.h" 11 #include "base/thread_task_runner_handle.h"
12 #include "cc/animation/animation.h" 12 #include "cc/animation/animation.h"
13 #include "cc/animation/animation_host.h" 13 #include "cc/animation/animation_host.h"
14 #include "cc/animation/animation_registrar.h"
15 #include "cc/animation/layer_animation_controller.h" 14 #include "cc/animation/layer_animation_controller.h"
16 #include "cc/animation/timing_function.h" 15 #include "cc/animation/timing_function.h"
17 #include "cc/base/switches.h" 16 #include "cc/base/switches.h"
18 #include "cc/input/input_handler.h" 17 #include "cc/input/input_handler.h"
19 #include "cc/layers/layer.h" 18 #include "cc/layers/layer.h"
20 #include "cc/layers/layer_impl.h" 19 #include "cc/layers/layer_impl.h"
21 #include "cc/proto/compositor_message_to_impl.pb.h" 20 #include "cc/proto/compositor_message_to_impl.pb.h"
22 #include "cc/test/animation_test_common.h" 21 #include "cc/test/animation_test_common.h"
23 #include "cc/test/begin_frame_args_test.h" 22 #include "cc/test/begin_frame_args_test.h"
24 #include "cc/test/fake_external_begin_frame_source.h" 23 #include "cc/test/fake_external_begin_frame_source.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 bool AnimateLayers(base::TimeTicks monotonic_time) override { 303 bool AnimateLayers(base::TimeTicks monotonic_time) override {
305 test_hooks_->WillAnimateLayers(this, monotonic_time); 304 test_hooks_->WillAnimateLayers(this, monotonic_time);
306 bool result = LayerTreeHostImpl::AnimateLayers(monotonic_time); 305 bool result = LayerTreeHostImpl::AnimateLayers(monotonic_time);
307 test_hooks_->AnimateLayers(this, monotonic_time); 306 test_hooks_->AnimateLayers(this, monotonic_time);
308 return result; 307 return result;
309 } 308 }
310 309
311 void UpdateAnimationState(bool start_ready_animations) override { 310 void UpdateAnimationState(bool start_ready_animations) override {
312 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations); 311 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations);
313 bool has_unfinished_animation = false; 312 bool has_unfinished_animation = false;
314 AnimationRegistrar* registrar = animation_host()->animation_registrar();
315 for (const auto& it : 313 for (const auto& it :
316 registrar->active_animation_controllers_for_testing()) { 314 animation_host()->active_animation_controllers_for_testing()) {
317 if (it.second->HasActiveAnimation()) { 315 if (it.second->HasActiveAnimation()) {
318 has_unfinished_animation = true; 316 has_unfinished_animation = true;
319 break; 317 break;
320 } 318 }
321 } 319 }
322 test_hooks_->UpdateAnimationState(this, has_unfinished_animation); 320 test_hooks_->UpdateAnimationState(this, has_unfinished_animation);
323 } 321 }
324 322
325 void NotifyTileStateChanged(const Tile* tile) override { 323 void NotifyTileStateChanged(const Tile* tile) override {
326 LayerTreeHostImpl::NotifyTileStateChanged(tile); 324 LayerTreeHostImpl::NotifyTileStateChanged(tile);
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 1037
1040 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { 1038 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const {
1041 DCHECK(IsRemoteTest()); 1039 DCHECK(IsRemoteTest());
1042 DCHECK(remote_client_layer_tree_host_); 1040 DCHECK(remote_client_layer_tree_host_);
1043 1041
1044 return static_cast<RemoteChannelImplForTest*>( 1042 return static_cast<RemoteChannelImplForTest*>(
1045 remote_client_layer_tree_host_->proxy()); 1043 remote_client_layer_tree_host_->proxy());
1046 } 1044 }
1047 1045
1048 } // namespace cc 1046 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_timelines_test_common.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698