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

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

Issue 1904653002: CC Animation: Merge LayerAnimationController into ElementAnimations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor optimization: Don't init value observations if same host. 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_common_unittest.cc » ('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/layer_animation_controller.h" 14 #include "cc/animation/element_animations.h"
15 #include "cc/animation/timing_function.h" 15 #include "cc/animation/timing_function.h"
16 #include "cc/base/switches.h" 16 #include "cc/base/switches.h"
17 #include "cc/input/input_handler.h" 17 #include "cc/input/input_handler.h"
18 #include "cc/layers/layer.h" 18 #include "cc/layers/layer.h"
19 #include "cc/layers/layer_impl.h" 19 #include "cc/layers/layer_impl.h"
20 #include "cc/proto/compositor_message_to_impl.pb.h" 20 #include "cc/proto/compositor_message_to_impl.pb.h"
21 #include "cc/test/animation_test_common.h" 21 #include "cc/test/animation_test_common.h"
22 #include "cc/test/begin_frame_args_test.h" 22 #include "cc/test/begin_frame_args_test.h"
23 #include "cc/test/fake_external_begin_frame_source.h" 23 #include "cc/test/fake_external_begin_frame_source.h"
24 #include "cc/test/fake_layer_tree_host_client.h" 24 #include "cc/test/fake_layer_tree_host_client.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 test_hooks_->WillAnimateLayers(this, monotonic_time); 304 test_hooks_->WillAnimateLayers(this, monotonic_time);
305 bool result = LayerTreeHostImpl::AnimateLayers(monotonic_time); 305 bool result = LayerTreeHostImpl::AnimateLayers(monotonic_time);
306 test_hooks_->AnimateLayers(this, monotonic_time); 306 test_hooks_->AnimateLayers(this, monotonic_time);
307 return result; 307 return result;
308 } 308 }
309 309
310 void UpdateAnimationState(bool start_ready_animations) override { 310 void UpdateAnimationState(bool start_ready_animations) override {
311 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations); 311 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations);
312 bool has_unfinished_animation = false; 312 bool has_unfinished_animation = false;
313 for (const auto& it : 313 for (const auto& it :
314 animation_host()->active_animation_controllers_for_testing()) { 314 animation_host()->active_element_animations_for_testing()) {
315 if (it.second->HasActiveAnimation()) { 315 if (it.second->HasActiveAnimation()) {
316 has_unfinished_animation = true; 316 has_unfinished_animation = true;
317 break; 317 break;
318 } 318 }
319 } 319 }
320 test_hooks_->UpdateAnimationState(this, has_unfinished_animation); 320 test_hooks_->UpdateAnimationState(this, has_unfinished_animation);
321 } 321 }
322 322
323 void NotifyTileStateChanged(const Tile* tile) override { 323 void NotifyTileStateChanged(const Tile* tile) override {
324 LayerTreeHostImpl::NotifyTileStateChanged(tile); 324 LayerTreeHostImpl::NotifyTileStateChanged(tile);
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 1028
1029 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { 1029 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const {
1030 DCHECK(IsRemoteTest()); 1030 DCHECK(IsRemoteTest());
1031 DCHECK(remote_client_layer_tree_host_); 1031 DCHECK(remote_client_layer_tree_host_);
1032 1032
1033 return static_cast<RemoteChannelImplForTest*>( 1033 return static_cast<RemoteChannelImplForTest*>(
1034 remote_client_layer_tree_host_->proxy()); 1034 remote_client_layer_tree_host_->proxy());
1035 } 1035 }
1036 1036
1037 } // namespace cc 1037 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/animation_timelines_test_common.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698