| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 test_hooks_->DidBeginMainFrame(); | 217 test_hooks_->DidBeginMainFrame(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 virtual void Animate(double monotonic_time) OVERRIDE { | 220 virtual void Animate(double monotonic_time) OVERRIDE { |
| 221 test_hooks_->Animate(base::TimeTicks::FromInternalValue( | 221 test_hooks_->Animate(base::TimeTicks::FromInternalValue( |
| 222 monotonic_time * base::Time::kMicrosecondsPerSecond)); | 222 monotonic_time * base::Time::kMicrosecondsPerSecond)); |
| 223 } | 223 } |
| 224 | 224 |
| 225 virtual void Layout() OVERRIDE { test_hooks_->Layout(); } | 225 virtual void Layout() OVERRIDE { test_hooks_->Layout(); } |
| 226 | 226 |
| 227 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, | 227 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta, |
| 228 float scale) OVERRIDE { | 228 float scale) OVERRIDE { |
| 229 test_hooks_->ApplyScrollAndScale(scroll_delta, scale); | 229 test_hooks_->ApplyScrollAndScale(scroll_delta, scale); |
| 230 } | 230 } |
| 231 | 231 |
| 232 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) | 232 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) |
| 233 OVERRIDE { | 233 OVERRIDE { |
| 234 return test_hooks_->CreateOutputSurface(fallback); | 234 return test_hooks_->CreateOutputSurface(fallback); |
| 235 } | 235 } |
| 236 | 236 |
| 237 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { | 237 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 compositor_contexts_ = TestContextProvider::Create(); | 694 compositor_contexts_ = TestContextProvider::Create(); |
| 695 return compositor_contexts_; | 695 return compositor_contexts_; |
| 696 } | 696 } |
| 697 | 697 |
| 698 TestWebGraphicsContext3D* LayerTreeTest::TestContext() { | 698 TestWebGraphicsContext3D* LayerTreeTest::TestContext() { |
| 699 return static_cast<TestContextProvider*>( | 699 return static_cast<TestContextProvider*>( |
| 700 output_surface_->context_provider().get())->TestContext3d(); | 700 output_surface_->context_provider().get())->TestContext3d(); |
| 701 } | 701 } |
| 702 | 702 |
| 703 } // namespace cc | 703 } // namespace cc |
| OLD | NEW |