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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 protected: | 74 protected: |
75 FakeContentLayerClient content_layer_client_; | 75 FakeContentLayerClient content_layer_client_; |
76 LapTimer timer_; | 76 LapTimer timer_; |
77 std::string test_name_; | 77 std::string test_name_; |
78 std::string json_; | 78 std::string json_; |
79 }; | 79 }; |
80 | 80 |
81 class CalcDrawPropsMainTest : public LayerTreeHostCommonPerfTest { | 81 class CalcDrawPropsMainTest : public LayerTreeHostCommonPerfTest { |
82 public: | 82 public: |
83 void RunCalcDrawProps() { | 83 void RunCalcDrawProps() { RunTest(false, false, false); } |
84 RunTest(false, false, false); | |
85 } | |
86 | 84 |
87 void BeginTest() override { | 85 void BeginTest() override { |
88 timer_.Reset(); | 86 timer_.Reset(); |
89 | 87 |
90 do { | 88 do { |
91 bool can_render_to_separate_surface = true; | 89 bool can_render_to_separate_surface = true; |
92 int max_texture_size = 8096; | 90 int max_texture_size = 8096; |
93 RenderSurfaceLayerList update_list; | 91 RenderSurfaceLayerList update_list; |
94 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs( | 92 LayerTreeHostCommon::CalcDrawPropsMainInputs inputs( |
95 layer_tree_host()->root_layer(), | 93 layer_tree_host()->root_layer(), |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 | 315 |
318 TEST_F(LayerSorterMainTest, LayerSorterCubes) { | 316 TEST_F(LayerSorterMainTest, LayerSorterCubes) { |
319 SetTestName("layer_sort_cubes"); | 317 SetTestName("layer_sort_cubes"); |
320 ReadTestFile("layer_sort_cubes"); | 318 ReadTestFile("layer_sort_cubes"); |
321 RunSortLayers(); | 319 RunSortLayers(); |
322 } | 320 } |
323 | 321 |
324 TEST_F(LayerSorterMainTest, LayerSorterRubik) { | 322 TEST_F(LayerSorterMainTest, LayerSorterRubik) { |
325 SetTestName("layer_sort_rubik"); | 323 SetTestName("layer_sort_rubik"); |
326 ReadTestFile("layer_sort_rubik"); | 324 ReadTestFile("layer_sort_rubik"); |
| 325 // TODO(vollick): Remove verify_property_trees setting after |
| 326 // crbug.com/444219 is fixed. |
| 327 bool old_verify_property_trees = verify_property_trees(); |
| 328 set_verify_property_trees(false); |
327 RunSortLayers(); | 329 RunSortLayers(); |
| 330 set_verify_property_trees(old_verify_property_trees); |
328 } | 331 } |
329 | 332 |
330 TEST_F(BspTreePerfTest, BspTreeCubes) { | 333 TEST_F(BspTreePerfTest, BspTreeCubes) { |
331 SetTestName("bsp_tree_cubes"); | 334 SetTestName("bsp_tree_cubes"); |
332 SetNumberOfDuplicates(1); | 335 SetNumberOfDuplicates(1); |
333 ReadTestFile("layer_sort_cubes"); | 336 ReadTestFile("layer_sort_cubes"); |
334 RunSortLayers(); | 337 RunSortLayers(); |
335 } | 338 } |
336 | 339 |
337 TEST_F(BspTreePerfTest, BspTreeRubik) { | 340 TEST_F(BspTreePerfTest, BspTreeRubik) { |
338 SetTestName("bsp_tree_rubik"); | 341 SetTestName("bsp_tree_rubik"); |
339 SetNumberOfDuplicates(1); | 342 SetNumberOfDuplicates(1); |
340 ReadTestFile("layer_sort_rubik"); | 343 ReadTestFile("layer_sort_rubik"); |
| 344 // TODO(vollick): Remove verify_property_trees setting after |
| 345 // crbug.com/444219 is fixed. |
| 346 bool old_verify_property_trees = verify_property_trees(); |
| 347 set_verify_property_trees(false); |
341 RunSortLayers(); | 348 RunSortLayers(); |
| 349 set_verify_property_trees(old_verify_property_trees); |
342 } | 350 } |
343 | 351 |
344 TEST_F(BspTreePerfTest, BspTreeCubes_2) { | 352 TEST_F(BspTreePerfTest, BspTreeCubes_2) { |
345 SetTestName("bsp_tree_cubes_2"); | 353 SetTestName("bsp_tree_cubes_2"); |
346 SetNumberOfDuplicates(2); | 354 SetNumberOfDuplicates(2); |
347 ReadTestFile("layer_sort_cubes"); | 355 ReadTestFile("layer_sort_cubes"); |
348 RunSortLayers(); | 356 RunSortLayers(); |
349 } | 357 } |
350 | 358 |
351 TEST_F(BspTreePerfTest, BspTreeCubes_4) { | 359 TEST_F(BspTreePerfTest, BspTreeCubes_4) { |
352 SetTestName("bsp_tree_cubes_4"); | 360 SetTestName("bsp_tree_cubes_4"); |
353 SetNumberOfDuplicates(4); | 361 SetNumberOfDuplicates(4); |
354 ReadTestFile("layer_sort_cubes"); | 362 ReadTestFile("layer_sort_cubes"); |
355 RunSortLayers(); | 363 RunSortLayers(); |
356 } | 364 } |
357 | 365 |
358 } // namespace | 366 } // namespace |
359 } // namespace cc | 367 } // namespace cc |
OLD | NEW |