| 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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 gpu_memory_buffer_manager_.reset(new TestGpuMemoryBufferManager); | 750 gpu_memory_buffer_manager_.reset(new TestGpuMemoryBufferManager); |
| 751 task_graph_runner_.reset(new TestTaskGraphRunner); | 751 task_graph_runner_.reset(new TestTaskGraphRunner); |
| 752 | 752 |
| 753 // Spend less time waiting for BeginFrame because the output is | 753 // Spend less time waiting for BeginFrame because the output is |
| 754 // mocked out. | 754 // mocked out. |
| 755 settings_.renderer_settings.refresh_rate = 200.0; | 755 settings_.renderer_settings.refresh_rate = 200.0; |
| 756 settings_.background_animation_rate = 200.0; | 756 settings_.background_animation_rate = 200.0; |
| 757 // Disable latency recovery to make the scheduler more predictable in its | 757 // Disable latency recovery to make the scheduler more predictable in its |
| 758 // actions and less dependent on timings to make decisions. | 758 // actions and less dependent on timings to make decisions. |
| 759 settings_.enable_latency_recovery = false; | 759 settings_.enable_latency_recovery = false; |
| 760 settings_.verify_clip_tree_calculations = true; | |
| 761 settings_.renderer_settings.buffer_to_texture_target_map = | 760 settings_.renderer_settings.buffer_to_texture_target_map = |
| 762 DefaultBufferToTextureTargetMapForTesting(); | 761 DefaultBufferToTextureTargetMapForTesting(); |
| 763 InitializeSettings(&settings_); | 762 InitializeSettings(&settings_); |
| 764 | 763 |
| 765 base::ThreadTaskRunnerHandle::Get()->PostTask( | 764 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 766 FROM_HERE, | 765 FROM_HERE, |
| 767 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); | 766 base::Bind(&LayerTreeTest::DoBeginTest, base::Unretained(this))); |
| 768 | 767 |
| 769 base::RunLoop().Run(); | 768 base::RunLoop().Run(); |
| 770 DestroyLayerTreeHost(); | 769 DestroyLayerTreeHost(); |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 task_runner_provider()->IsMainThreadBlocked()); | 843 task_runner_provider()->IsMainThreadBlocked()); |
| 845 return layer_tree_host_in_process_; | 844 return layer_tree_host_in_process_; |
| 846 } | 845 } |
| 847 | 846 |
| 848 Proxy* LayerTreeTest::proxy() { | 847 Proxy* LayerTreeTest::proxy() { |
| 849 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy() | 848 return layer_tree_host_in_process() ? layer_tree_host_in_process()->proxy() |
| 850 : NULL; | 849 : NULL; |
| 851 } | 850 } |
| 852 | 851 |
| 853 } // namespace cc | 852 } // namespace cc |
| OLD | NEW |