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 <deque> | 7 #include <deque> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 ASSERT_TRUE(base::ReadFileToString(json_file, &json_)); | 49 ASSERT_TRUE(base::ReadFileToString(json_file, &json_)); |
50 } | 50 } |
51 | 51 |
52 void SetupTree() override { | 52 void SetupTree() override { |
53 gfx::Size viewport = gfx::Size(720, 1038); | 53 gfx::Size viewport = gfx::Size(720, 1038); |
54 layer_tree_host()->SetViewportSize(viewport); | 54 layer_tree_host()->SetViewportSize(viewport); |
55 scoped_refptr<Layer> root = | 55 scoped_refptr<Layer> root = |
56 ParseTreeFromJson(json_, &content_layer_client_); | 56 ParseTreeFromJson(json_, &content_layer_client_); |
57 ASSERT_TRUE(root.get()); | 57 ASSERT_TRUE(root.get()); |
58 layer_tree_host()->SetRootLayer(root); | 58 layer_tree_host()->SetRootLayer(root); |
| 59 content_layer_client_.set_bounds(viewport); |
59 } | 60 } |
60 | 61 |
61 void SetTestName(const std::string& name) { test_name_ = name; } | 62 void SetTestName(const std::string& name) { test_name_ = name; } |
62 | 63 |
63 void AfterTest() override { | 64 void AfterTest() override { |
64 CHECK(!test_name_.empty()) << "Must SetTestName() before TearDown()."; | 65 CHECK(!test_name_.empty()) << "Must SetTestName() before TearDown()."; |
65 perf_test::PrintResult("calc_draw_props_time", | 66 perf_test::PrintResult("calc_draw_props_time", |
66 "", | 67 "", |
67 test_name_, | 68 test_name_, |
68 1000 * timer_.MsPerLap(), | 69 1000 * timer_.MsPerLap(), |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 263 |
263 TEST_F(BspTreePerfTest, BspTreeCubes_4) { | 264 TEST_F(BspTreePerfTest, BspTreeCubes_4) { |
264 SetTestName("bsp_tree_cubes_4"); | 265 SetTestName("bsp_tree_cubes_4"); |
265 SetNumberOfDuplicates(4); | 266 SetNumberOfDuplicates(4); |
266 ReadTestFile("layer_sort_cubes"); | 267 ReadTestFile("layer_sort_cubes"); |
267 RunSortLayers(); | 268 RunSortLayers(); |
268 } | 269 } |
269 | 270 |
270 } // namespace | 271 } // namespace |
271 } // namespace cc | 272 } // namespace cc |
OLD | NEW |