| 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" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "cc/proto/compositor_message_to_impl.pb.h" | 22 #include "cc/proto/compositor_message_to_impl.pb.h" |
| 23 #include "cc/test/animation_test_common.h" | 23 #include "cc/test/animation_test_common.h" |
| 24 #include "cc/test/begin_frame_args_test.h" | 24 #include "cc/test/begin_frame_args_test.h" |
| 25 #include "cc/test/fake_external_begin_frame_source.h" | 25 #include "cc/test/fake_external_begin_frame_source.h" |
| 26 #include "cc/test/fake_image_serialization_processor.h" | 26 #include "cc/test/fake_image_serialization_processor.h" |
| 27 #include "cc/test/fake_layer_tree_host_client.h" | 27 #include "cc/test/fake_layer_tree_host_client.h" |
| 28 #include "cc/test/fake_output_surface.h" | 28 #include "cc/test/fake_output_surface.h" |
| 29 #include "cc/test/remote_channel_impl_for_test.h" | 29 #include "cc/test/remote_channel_impl_for_test.h" |
| 30 #include "cc/test/test_context_provider.h" | 30 #include "cc/test/test_context_provider.h" |
| 31 #include "cc/test/test_gpu_memory_buffer_manager.h" | 31 #include "cc/test/test_gpu_memory_buffer_manager.h" |
| 32 #include "cc/test/test_image_texture_targets_map.h" |
| 32 #include "cc/test/test_shared_bitmap_manager.h" | 33 #include "cc/test/test_shared_bitmap_manager.h" |
| 33 #include "cc/test/test_task_graph_runner.h" | 34 #include "cc/test/test_task_graph_runner.h" |
| 34 #include "cc/test/threaded_channel_for_test.h" | 35 #include "cc/test/threaded_channel_for_test.h" |
| 35 #include "cc/trees/layer_tree_host_client.h" | 36 #include "cc/trees/layer_tree_host_client.h" |
| 36 #include "cc/trees/layer_tree_host_impl.h" | 37 #include "cc/trees/layer_tree_host_impl.h" |
| 37 #include "cc/trees/layer_tree_host_single_thread_client.h" | 38 #include "cc/trees/layer_tree_host_single_thread_client.h" |
| 38 #include "cc/trees/layer_tree_impl.h" | 39 #include "cc/trees/layer_tree_impl.h" |
| 39 #include "cc/trees/proxy_impl.h" | 40 #include "cc/trees/proxy_impl.h" |
| 40 #include "cc/trees/proxy_main.h" | 41 #include "cc/trees/proxy_main.h" |
| 41 #include "cc/trees/single_thread_proxy.h" | 42 #include "cc/trees/single_thread_proxy.h" |
| (...skipping 833 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.use_image_texture_targets = |
| 887 TestImageTextureTargetsMap(); |
| 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 |