OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/trees/layer_tree_host_common.h" | 5 #include "cc/trees/layer_tree_host_common.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 can_render_to_separate_surface, | 156 can_render_to_separate_surface, |
157 host_impl->settings().layer_transforms_should_scale_layer_contents, | 157 host_impl->settings().layer_transforms_should_scale_layer_contents, |
158 host_impl->settings().verify_property_trees, | 158 host_impl->settings().verify_property_trees, |
159 &update_list, 0); | 159 &update_list, 0); |
160 LayerTreeHostCommon::CalculateDrawProperties(&inputs); | 160 LayerTreeHostCommon::CalculateDrawProperties(&inputs); |
161 } | 161 } |
162 }; | 162 }; |
163 | 163 |
164 class BspTreePerfTest : public CalcDrawPropsImplTest { | 164 class BspTreePerfTest : public CalcDrawPropsImplTest { |
165 public: | 165 public: |
| 166 BspTreePerfTest() : num_duplicates_(1) {} |
166 void RunSortLayers() { RunTest(false, false, false); } | 167 void RunSortLayers() { RunTest(false, false, false); } |
167 | 168 |
168 void SetNumberOfDuplicates(int num_duplicates) { | 169 void SetNumberOfDuplicates(int num_duplicates) { |
169 num_duplicates_ = num_duplicates; | 170 num_duplicates_ = num_duplicates; |
170 } | 171 } |
171 | 172 |
172 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 173 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
173 | 174 |
174 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { | 175 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { |
175 LayerTreeImpl* active_tree = host_impl->active_tree(); | 176 LayerTreeImpl* active_tree = host_impl->active_tree(); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 321 |
321 TEST_F(BspTreePerfTest, BspTreeCubes_4) { | 322 TEST_F(BspTreePerfTest, BspTreeCubes_4) { |
322 SetTestName("bsp_tree_cubes_4"); | 323 SetTestName("bsp_tree_cubes_4"); |
323 SetNumberOfDuplicates(4); | 324 SetNumberOfDuplicates(4); |
324 ReadTestFile("layer_sort_cubes"); | 325 ReadTestFile("layer_sort_cubes"); |
325 RunSortLayers(); | 326 RunSortLayers(); |
326 } | 327 } |
327 | 328 |
328 } // namespace | 329 } // namespace |
329 } // namespace cc | 330 } // namespace cc |
OLD | NEW |