Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: cc/output/bsp_tree_perftest.cc

Issue 2661523003: cc: Merge LayerTree into the LayerTreeHost. (Closed)
Patch Set: auto Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/ui_resource_layer.cc ('k') | cc/test/fake_layer_tree_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <deque> 7 #include <deque>
8 #include <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 26 matching lines...) Expand all
37 37
38 class BspTreePerfTest : public LayerTreeTest { 38 class BspTreePerfTest : public LayerTreeTest {
39 public: 39 public:
40 BspTreePerfTest() 40 BspTreePerfTest()
41 : timer_(kWarmupRuns, 41 : timer_(kWarmupRuns,
42 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), 42 base::TimeDelta::FromMilliseconds(kTimeLimitMillis),
43 kTimeCheckInterval) {} 43 kTimeCheckInterval) {}
44 44
45 void SetupTree() override { 45 void SetupTree() override {
46 gfx::Size viewport = gfx::Size(720, 1038); 46 gfx::Size viewport = gfx::Size(720, 1038);
47 layer_tree()->SetViewportSize(viewport); 47 layer_tree_host()->SetViewportSize(viewport);
48 scoped_refptr<Layer> root = 48 scoped_refptr<Layer> root =
49 ParseTreeFromJson(json_, &content_layer_client_); 49 ParseTreeFromJson(json_, &content_layer_client_);
50 ASSERT_TRUE(root.get()); 50 ASSERT_TRUE(root.get());
51 layer_tree()->SetRootLayer(root); 51 layer_tree_host()->SetRootLayer(root);
52 content_layer_client_.set_bounds(viewport); 52 content_layer_client_.set_bounds(viewport);
53 } 53 }
54 54
55 void SetTestName(const std::string& name) { test_name_ = name; } 55 void SetTestName(const std::string& name) { test_name_ = name; }
56 56
57 void SetNumberOfDuplicates(int num_duplicates) { 57 void SetNumberOfDuplicates(int num_duplicates) {
58 num_duplicates_ = num_duplicates; 58 num_duplicates_ = num_duplicates;
59 } 59 }
60 60
61 void ReadTestFile(const std::string& name) { 61 void ReadTestFile(const std::string& name) {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 TEST_F(BspTreePerfTest, BspTreeCubes_4) { 185 TEST_F(BspTreePerfTest, BspTreeCubes_4) {
186 SetTestName("bsp_tree_cubes_4"); 186 SetTestName("bsp_tree_cubes_4");
187 SetNumberOfDuplicates(4); 187 SetNumberOfDuplicates(4);
188 ReadTestFile("layer_sort_cubes"); 188 ReadTestFile("layer_sort_cubes");
189 RunTest(CompositorMode::SINGLE_THREADED); 189 RunTest(CompositorMode::SINGLE_THREADED);
190 } 190 }
191 191
192 } // namespace 192 } // namespace
193 } // namespace cc 193 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/ui_resource_layer.cc ('k') | cc/test/fake_layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698