OLD | NEW |
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 "cc/animation/animation.h" | 8 #include "cc/animation/animation.h" |
9 #include "cc/animation/animation_registrar.h" | 9 #include "cc/animation/animation_registrar.h" |
10 #include "cc/animation/layer_animation_controller.h" | 10 #include "cc/animation/layer_animation_controller.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 bool success = LayerTreeHostImpl::InitializeRenderer(output_surface.Pass()); | 162 bool success = LayerTreeHostImpl::InitializeRenderer(output_surface.Pass()); |
163 test_hooks_->InitializedRendererOnThread(this, success); | 163 test_hooks_->InitializedRendererOnThread(this, success); |
164 return success; | 164 return success; |
165 } | 165 } |
166 | 166 |
167 virtual void SetVisible(bool visible) OVERRIDE { | 167 virtual void SetVisible(bool visible) OVERRIDE { |
168 LayerTreeHostImpl::SetVisible(visible); | 168 LayerTreeHostImpl::SetVisible(visible); |
169 test_hooks_->DidSetVisibleOnImplTree(this, visible); | 169 test_hooks_->DidSetVisibleOnImplTree(this, visible); |
170 } | 170 } |
171 | 171 |
172 virtual void AnimateLayers(base::TimeTicks monotonic_time, | 172 virtual void AnimateLayers(base::TimeTicks monotonic_time) OVERRIDE { |
173 base::Time wall_clock_time) OVERRIDE { | |
174 test_hooks_->WillAnimateLayers(this, monotonic_time); | 173 test_hooks_->WillAnimateLayers(this, monotonic_time); |
175 LayerTreeHostImpl::AnimateLayers(monotonic_time, wall_clock_time); | 174 LayerTreeHostImpl::AnimateLayers(monotonic_time); |
176 test_hooks_->AnimateLayers(this, monotonic_time); | 175 test_hooks_->AnimateLayers(this, monotonic_time); |
177 } | 176 } |
178 | 177 |
179 virtual void UpdateAnimationState(bool start_ready_animations) OVERRIDE { | 178 virtual void UpdateAnimationState(bool start_ready_animations) OVERRIDE { |
180 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations); | 179 LayerTreeHostImpl::UpdateAnimationState(start_ready_animations); |
181 bool has_unfinished_animation = false; | 180 bool has_unfinished_animation = false; |
182 AnimationRegistrar::AnimationControllerMap::const_iterator iter = | 181 AnimationRegistrar::AnimationControllerMap::const_iterator iter = |
183 active_animation_controllers().begin(); | 182 active_animation_controllers().begin(); |
184 for (; iter != active_animation_controllers().end(); ++iter) { | 183 for (; iter != active_animation_controllers().end(); ++iter) { |
185 if (iter->second->HasActiveAnimation()) { | 184 if (iter->second->HasActiveAnimation()) { |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 return -1; | 706 return -1; |
708 } | 707 } |
709 | 708 |
710 void LayerTreeTest::DestroyLayerTreeHost() { | 709 void LayerTreeTest::DestroyLayerTreeHost() { |
711 if (layer_tree_host_ && layer_tree_host_->root_layer()) | 710 if (layer_tree_host_ && layer_tree_host_->root_layer()) |
712 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); | 711 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); |
713 layer_tree_host_.reset(); | 712 layer_tree_host_.reset(); |
714 } | 713 } |
715 | 714 |
716 } // namespace cc | 715 } // namespace cc |
OLD | NEW |