| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 } | 53 } |
| 54 | 54 |
| 55 scoped_refptr<cc::ContextProvider> TestHooks:: | 55 scoped_refptr<cc::ContextProvider> TestHooks:: |
| 56 OffscreenContextProviderForCompositorThread() { | 56 OffscreenContextProviderForCompositorThread() { |
| 57 return fake_client_->OffscreenContextProviderForCompositorThread(); | 57 return fake_client_->OffscreenContextProviderForCompositorThread(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks. | 60 // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks. |
| 61 class LayerTreeHostImplForTesting : public LayerTreeHostImpl { | 61 class LayerTreeHostImplForTesting : public LayerTreeHostImpl { |
| 62 public: | 62 public: |
| 63 typedef std::vector<LayerImpl*> LayerList; | |
| 64 | |
| 65 static scoped_ptr<LayerTreeHostImplForTesting> Create( | 63 static scoped_ptr<LayerTreeHostImplForTesting> Create( |
| 66 TestHooks* test_hooks, | 64 TestHooks* test_hooks, |
| 67 const LayerTreeSettings& settings, | 65 const LayerTreeSettings& settings, |
| 68 LayerTreeHostImplClient* host_impl_client, | 66 LayerTreeHostImplClient* host_impl_client, |
| 69 Proxy* proxy, | 67 Proxy* proxy, |
| 70 RenderingStatsInstrumentation* stats_instrumentation) { | 68 RenderingStatsInstrumentation* stats_instrumentation) { |
| 71 return make_scoped_ptr( | 69 return make_scoped_ptr( |
| 72 new LayerTreeHostImplForTesting(test_hooks, | 70 new LayerTreeHostImplForTesting(test_hooks, |
| 73 settings, | 71 settings, |
| 74 host_impl_client, | 72 host_impl_client, |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 ASSERT_FALSE(layer_tree_host_.get()); | 547 ASSERT_FALSE(layer_tree_host_.get()); |
| 550 client_.reset(); | 548 client_.reset(); |
| 551 if (timed_out_) { | 549 if (timed_out_) { |
| 552 FAIL() << "Test timed out"; | 550 FAIL() << "Test timed out"; |
| 553 return; | 551 return; |
| 554 } | 552 } |
| 555 AfterTest(); | 553 AfterTest(); |
| 556 } | 554 } |
| 557 | 555 |
| 558 } // namespace cc | 556 } // namespace cc |
| OLD | NEW |