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 "base/location.h" | 8 #include "base/location.h" |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
12 #include "base/threading/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "cc/animation/animation.h" | 13 #include "cc/animation/animation.h" |
14 #include "cc/animation/animation_host.h" | 14 #include "cc/animation/animation_host.h" |
15 #include "cc/animation/element_animations.h" | 15 #include "cc/animation/element_animations.h" |
16 #include "cc/animation/timing_function.h" | 16 #include "cc/animation/timing_function.h" |
17 #include "cc/base/switches.h" | 17 #include "cc/base/switches.h" |
18 #include "cc/blimp/image_serialization_processor.h" | 18 #include "cc/blimp/image_serialization_processor.h" |
19 #include "cc/input/input_handler.h" | 19 #include "cc/input/input_handler.h" |
20 #include "cc/layers/layer.h" | 20 #include "cc/layers/layer.h" |
21 #include "cc/layers/layer_impl.h" | 21 #include "cc/layers/layer_impl.h" |
| 22 #include "cc/output/buffer_to_texture_target_map.h" |
22 #include "cc/proto/compositor_message_to_impl.pb.h" | 23 #include "cc/proto/compositor_message_to_impl.pb.h" |
23 #include "cc/test/animation_test_common.h" | 24 #include "cc/test/animation_test_common.h" |
24 #include "cc/test/begin_frame_args_test.h" | 25 #include "cc/test/begin_frame_args_test.h" |
25 #include "cc/test/fake_external_begin_frame_source.h" | 26 #include "cc/test/fake_external_begin_frame_source.h" |
26 #include "cc/test/fake_image_serialization_processor.h" | 27 #include "cc/test/fake_image_serialization_processor.h" |
27 #include "cc/test/fake_layer_tree_host_client.h" | 28 #include "cc/test/fake_layer_tree_host_client.h" |
28 #include "cc/test/fake_output_surface.h" | 29 #include "cc/test/fake_output_surface.h" |
29 #include "cc/test/remote_channel_impl_for_test.h" | 30 #include "cc/test/remote_channel_impl_for_test.h" |
30 #include "cc/test/test_context_provider.h" | 31 #include "cc/test/test_context_provider.h" |
31 #include "cc/test/test_gpu_memory_buffer_manager.h" | 32 #include "cc/test/test_gpu_memory_buffer_manager.h" |
(...skipping 843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 task_graph_runner_.reset(new TestTaskGraphRunner); | 876 task_graph_runner_.reset(new TestTaskGraphRunner); |
876 | 877 |
877 delegating_renderer_ = delegating_renderer; | 878 delegating_renderer_ = delegating_renderer; |
878 | 879 |
879 // Spend less time waiting for BeginFrame because the output is | 880 // Spend less time waiting for BeginFrame because the output is |
880 // mocked out. | 881 // mocked out. |
881 settings_.renderer_settings.refresh_rate = 200.0; | 882 settings_.renderer_settings.refresh_rate = 200.0; |
882 settings_.background_animation_rate = 200.0; | 883 settings_.background_animation_rate = 200.0; |
883 settings_.verify_clip_tree_calculations = true; | 884 settings_.verify_clip_tree_calculations = true; |
884 settings_.verify_transform_tree_calculations = true; | 885 settings_.verify_transform_tree_calculations = true; |
| 886 settings_.renderer_settings.buffer_to_texture_target_map = |
| 887 DefaultBufferToTextureTargetMapForTesting(); |
885 InitializeSettings(&settings_); | 888 InitializeSettings(&settings_); |
886 | 889 |
887 main_task_runner_->PostTask( | 890 main_task_runner_->PostTask( |
888 FROM_HERE, | 891 FROM_HERE, |
889 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); | 892 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); |
890 | 893 |
891 if (timeout_seconds_) { | 894 if (timeout_seconds_) { |
892 timeout_.Reset(base::Bind(&LayerTreeTest::Timeout, base::Unretained(this))); | 895 timeout_.Reset(base::Bind(&LayerTreeTest::Timeout, base::Unretained(this))); |
893 main_task_runner_->PostDelayedTask( | 896 main_task_runner_->PostDelayedTask( |
894 FROM_HERE, | 897 FROM_HERE, |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 | 1048 |
1046 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { | 1049 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { |
1047 DCHECK(IsRemoteTest()); | 1050 DCHECK(IsRemoteTest()); |
1048 DCHECK(remote_client_layer_tree_host_); | 1051 DCHECK(remote_client_layer_tree_host_); |
1049 | 1052 |
1050 return static_cast<RemoteChannelImplForTest*>( | 1053 return static_cast<RemoteChannelImplForTest*>( |
1051 remote_client_layer_tree_host_->proxy()); | 1054 remote_client_layer_tree_host_->proxy()); |
1052 } | 1055 } |
1053 | 1056 |
1054 } // namespace cc | 1057 } // namespace cc |
OLD | NEW |