| 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" |
| 11 #include "cc/animation/timing_function.h" | 11 #include "cc/animation/timing_function.h" |
| 12 #include "cc/base/switches.h" | 12 #include "cc/base/switches.h" |
| 13 #include "cc/input/input_handler.h" | 13 #include "cc/input/input_handler.h" |
| 14 #include "cc/layers/content_layer.h" | 14 #include "cc/layers/content_layer.h" |
| 15 #include "cc/layers/layer.h" | 15 #include "cc/layers/layer.h" |
| 16 #include "cc/layers/layer_impl.h" | 16 #include "cc/layers/layer_impl.h" |
| 17 #include "cc/test/animation_test_common.h" | 17 #include "cc/test/animation_test_common.h" |
| 18 #include "cc/test/fake_layer_tree_host_client.h" | 18 #include "cc/test/fake_layer_tree_host_client.h" |
| 19 #include "cc/test/fake_output_surface.h" | 19 #include "cc/test/fake_output_surface.h" |
| 20 #include "cc/test/occlusion_tracker_test_common.h" | 20 #include "cc/test/occlusion_tracker_test_common.h" |
| 21 #include "cc/test/test_context_provider.h" | 21 #include "cc/test/test_context_provider.h" |
| 22 #include "cc/test/tiled_layer_test_common.h" | 22 #include "cc/test/tiled_layer_test_common.h" |
| 23 #include "cc/trees/layer_tree_host_client.h" | 23 #include "cc/trees/layer_tree_host_client.h" |
| 24 #include "cc/trees/layer_tree_host_impl.h" | 24 #include "cc/trees/layer_tree_host_impl.h" |
| 25 #include "cc/trees/layer_tree_host_single_thread_client.h" | 25 #include "cc/trees/layer_tree_host_single_thread_client.h" |
| 26 #include "cc/trees/layer_tree_impl.h" |
| 26 #include "cc/trees/single_thread_proxy.h" | 27 #include "cc/trees/single_thread_proxy.h" |
| 27 #include "testing/gmock/include/gmock/gmock.h" | 28 #include "testing/gmock/include/gmock/gmock.h" |
| 28 #include "ui/gfx/frame_time.h" | 29 #include "ui/gfx/frame_time.h" |
| 29 #include "ui/gfx/size_conversions.h" | 30 #include "ui/gfx/size_conversions.h" |
| 30 | 31 |
| 31 namespace cc { | 32 namespace cc { |
| 32 | 33 |
| 33 TestHooks::TestHooks() {} | 34 TestHooks::TestHooks() {} |
| 34 | 35 |
| 35 TestHooks::~TestHooks() {} | 36 TestHooks::~TestHooks() {} |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 compositor_contexts_->DestroyedOnMainThread()) | 694 compositor_contexts_->DestroyedOnMainThread()) |
| 694 compositor_contexts_ = TestContextProvider::Create(); | 695 compositor_contexts_ = TestContextProvider::Create(); |
| 695 return compositor_contexts_; | 696 return compositor_contexts_; |
| 696 } | 697 } |
| 697 | 698 |
| 698 TestWebGraphicsContext3D* LayerTreeTest::TestContext() { | 699 TestWebGraphicsContext3D* LayerTreeTest::TestContext() { |
| 699 return static_cast<TestContextProvider*>( | 700 return static_cast<TestContextProvider*>( |
| 700 output_surface_->context_provider().get())->TestContext3d(); | 701 output_surface_->context_provider().get())->TestContext3d(); |
| 701 } | 702 } |
| 702 | 703 |
| 704 int LayerTreeTest::LastCommittedSourceFrameNumber(LayerTreeHostImpl* impl) |
| 705 const { |
| 706 if (impl->pending_tree()) |
| 707 return impl->pending_tree()->source_frame_number(); |
| 708 if (impl->active_tree()) |
| 709 return impl->active_tree()->source_frame_number(); |
| 710 // Source frames start at 0, so this is invalid. |
| 711 return -1; |
| 712 } |
| 713 |
| 703 } // namespace cc | 714 } // namespace cc |
| OLD | NEW |