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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 245 |
246 // Implementation of LayerTreeHost callback interface. | 246 // Implementation of LayerTreeHost callback interface. |
247 class LayerTreeHostClientForTesting : public LayerTreeHostClient { | 247 class LayerTreeHostClientForTesting : public LayerTreeHostClient { |
248 public: | 248 public: |
249 static scoped_ptr<LayerTreeHostClientForTesting> Create( | 249 static scoped_ptr<LayerTreeHostClientForTesting> Create( |
250 TestHooks* test_hooks) { | 250 TestHooks* test_hooks) { |
251 return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks)); | 251 return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks)); |
252 } | 252 } |
253 virtual ~LayerTreeHostClientForTesting() {} | 253 virtual ~LayerTreeHostClientForTesting() {} |
254 | 254 |
255 virtual void WillBeginMainFrame() OVERRIDE { | 255 virtual void WillBeginMainFrame(int frame_id) OVERRIDE { |
256 test_hooks_->WillBeginMainFrame(); | 256 test_hooks_->WillBeginMainFrame(); |
257 } | 257 } |
258 | 258 |
259 virtual void DidBeginMainFrame() OVERRIDE { | 259 virtual void DidBeginMainFrame() OVERRIDE { |
260 test_hooks_->DidBeginMainFrame(); | 260 test_hooks_->DidBeginMainFrame(); |
261 } | 261 } |
262 | 262 |
263 virtual void Animate(double monotonic_time) OVERRIDE { | 263 virtual void Animate(double monotonic_time) OVERRIDE { |
264 test_hooks_->Animate(base::TimeTicks::FromInternalValue( | 264 test_hooks_->Animate(base::TimeTicks::FromInternalValue( |
265 monotonic_time * base::Time::kMicrosecondsPerSecond)); | 265 monotonic_time * base::Time::kMicrosecondsPerSecond)); |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 } | 658 } |
659 | 659 |
660 scoped_refptr<ContextProvider> LayerTreeTest::OffscreenContextProvider() { | 660 scoped_refptr<ContextProvider> LayerTreeTest::OffscreenContextProvider() { |
661 if (!compositor_contexts_.get() || | 661 if (!compositor_contexts_.get() || |
662 compositor_contexts_->DestroyedOnMainThread()) | 662 compositor_contexts_->DestroyedOnMainThread()) |
663 compositor_contexts_ = TestContextProvider::Create(); | 663 compositor_contexts_ = TestContextProvider::Create(); |
664 return compositor_contexts_; | 664 return compositor_contexts_; |
665 } | 665 } |
666 | 666 |
667 } // namespace cc | 667 } // namespace cc |
OLD | NEW |