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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 test_hooks_->DidBeginMainFrame(); | 219 test_hooks_->DidBeginMainFrame(); |
220 } | 220 } |
221 | 221 |
222 virtual void Animate(double monotonic_time) OVERRIDE { | 222 virtual void Animate(double monotonic_time) OVERRIDE { |
223 test_hooks_->Animate(base::TimeTicks::FromInternalValue( | 223 test_hooks_->Animate(base::TimeTicks::FromInternalValue( |
224 monotonic_time * base::Time::kMicrosecondsPerSecond)); | 224 monotonic_time * base::Time::kMicrosecondsPerSecond)); |
225 } | 225 } |
226 | 226 |
227 virtual void Layout() OVERRIDE { test_hooks_->Layout(); } | 227 virtual void Layout() OVERRIDE { test_hooks_->Layout(); } |
228 | 228 |
229 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, | 229 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, |
230 float scale) OVERRIDE { | 230 float scale) OVERRIDE { |
231 test_hooks_->ApplyScrollAndScale(scroll_delta, scale); | 231 test_hooks_->ApplyScrollAndScale(scroll_delta, scale); |
232 } | 232 } |
233 | 233 |
234 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) | 234 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) |
235 OVERRIDE { | 235 OVERRIDE { |
236 return test_hooks_->CreateOutputSurface(fallback); | 236 return test_hooks_->CreateOutputSurface(fallback); |
237 } | 237 } |
238 | 238 |
239 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { | 239 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 const { | 706 const { |
707 if (impl->pending_tree()) | 707 if (impl->pending_tree()) |
708 return impl->pending_tree()->source_frame_number(); | 708 return impl->pending_tree()->source_frame_number(); |
709 if (impl->active_tree()) | 709 if (impl->active_tree()) |
710 return impl->active_tree()->source_frame_number(); | 710 return impl->active_tree()->source_frame_number(); |
711 // Source frames start at 0, so this is invalid. | 711 // Source frames start at 0, so this is invalid. |
712 return -1; | 712 return -1; |
713 } | 713 } |
714 | 714 |
715 } // namespace cc | 715 } // namespace cc |
OLD | NEW |