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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 task_graph_runner_.reset(new TestTaskGraphRunner); | 878 task_graph_runner_.reset(new TestTaskGraphRunner); |
878 | 879 |
879 delegating_renderer_ = delegating_renderer; | 880 delegating_renderer_ = delegating_renderer; |
880 | 881 |
881 // Spend less time waiting for BeginFrame because the output is | 882 // Spend less time waiting for BeginFrame because the output is |
882 // mocked out. | 883 // mocked out. |
883 settings_.renderer_settings.refresh_rate = 200.0; | 884 settings_.renderer_settings.refresh_rate = 200.0; |
884 settings_.background_animation_rate = 200.0; | 885 settings_.background_animation_rate = 200.0; |
885 settings_.verify_clip_tree_calculations = true; | 886 settings_.verify_clip_tree_calculations = true; |
886 settings_.verify_transform_tree_calculations = true; | 887 settings_.verify_transform_tree_calculations = true; |
| 888 settings_.renderer_settings.buffer_to_texture_target_map = |
| 889 DefaultBufferToTextureTargetMapForTesting(); |
887 InitializeSettings(&settings_); | 890 InitializeSettings(&settings_); |
888 | 891 |
889 base::ThreadTaskRunnerHandle::Get()->PostTask( | 892 base::ThreadTaskRunnerHandle::Get()->PostTask( |
890 FROM_HERE, | 893 FROM_HERE, |
891 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); | 894 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); |
892 | 895 |
893 base::RunLoop().Run(); | 896 base::RunLoop().Run(); |
894 DestroyLayerTreeHost(); | 897 DestroyLayerTreeHost(); |
895 | 898 |
896 timeout_.Cancel(); | 899 timeout_.Cancel(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 | 1023 |
1021 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { | 1024 RemoteChannelImplForTest* LayerTreeTest::GetRemoteChannelImplForTest() const { |
1022 DCHECK(IsRemoteTest()); | 1025 DCHECK(IsRemoteTest()); |
1023 DCHECK(remote_client_layer_tree_host_); | 1026 DCHECK(remote_client_layer_tree_host_); |
1024 | 1027 |
1025 return static_cast<RemoteChannelImplForTest*>( | 1028 return static_cast<RemoteChannelImplForTest*>( |
1026 remote_client_layer_tree_host_->proxy()); | 1029 remote_client_layer_tree_host_->proxy()); |
1027 } | 1030 } |
1028 | 1031 |
1029 } // namespace cc | 1032 } // namespace cc |
OLD | NEW |