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

Side by Side Diff: cc/trees/layer_tree_host_common_perftest.cc

Issue 2231233002: cc: Remove the lie of "DirectRenderer" in LayerTreeTests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no-ltt-delegating: ccpt Created 4 years, 4 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/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_perftest.cc » ('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 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 <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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 CalcDrawPropsTest : public LayerTreeHostCommonPerfTest { 81 class CalcDrawPropsTest : public LayerTreeHostCommonPerfTest {
82 public: 82 public:
83 void RunCalcDrawProps() { RunTest(CompositorMode::SINGLE_THREADED, false); } 83 void RunCalcDrawProps() { RunTest(CompositorMode::SINGLE_THREADED); }
84 84
85 void BeginTest() override { PostSetNeedsCommitToMainThread(); } 85 void BeginTest() override { PostSetNeedsCommitToMainThread(); }
86 86
87 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { 87 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
88 timer_.Reset(); 88 timer_.Reset();
89 LayerTreeImpl* active_tree = host_impl->active_tree(); 89 LayerTreeImpl* active_tree = host_impl->active_tree();
90 90
91 do { 91 do {
92 bool can_render_to_separate_surface = true; 92 bool can_render_to_separate_surface = true;
93 int max_texture_size = 8096; 93 int max_texture_size = 8096;
(...skipping 27 matching lines...) Expand all
121 false, // do not verify_clip_tree_calculation for perf tests 121 false, // do not verify_clip_tree_calculation for perf tests
122 false, // do not verify_transform_tree_calculation for perf tests 122 false, // do not verify_transform_tree_calculation for perf tests
123 &update_list, active_tree->property_trees()); 123 &update_list, active_tree->property_trees());
124 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 124 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
125 } 125 }
126 }; 126 };
127 127
128 class BspTreePerfTest : public CalcDrawPropsTest { 128 class BspTreePerfTest : public CalcDrawPropsTest {
129 public: 129 public:
130 BspTreePerfTest() : num_duplicates_(1) {} 130 BspTreePerfTest() : num_duplicates_(1) {}
131 void RunSortLayers() { RunTest(CompositorMode::SINGLE_THREADED, false); } 131 void RunSortLayers() { RunTest(CompositorMode::SINGLE_THREADED); }
132 132
133 void SetNumberOfDuplicates(int num_duplicates) { 133 void SetNumberOfDuplicates(int num_duplicates) {
134 num_duplicates_ = num_duplicates; 134 num_duplicates_ = num_duplicates;
135 } 135 }
136 136
137 void BeginTest() override { PostSetNeedsCommitToMainThread(); } 137 void BeginTest() override { PostSetNeedsCommitToMainThread(); }
138 138
139 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { 139 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
140 LayerTreeImpl* active_tree = host_impl->active_tree(); 140 LayerTreeImpl* active_tree = host_impl->active_tree();
141 // First build the tree and then we'll start running tests on layersorter 141 // First build the tree and then we'll start running tests on layersorter
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 247
248 TEST_F(BspTreePerfTest, BspTreeCubes_4) { 248 TEST_F(BspTreePerfTest, BspTreeCubes_4) {
249 SetTestName("bsp_tree_cubes_4"); 249 SetTestName("bsp_tree_cubes_4");
250 SetNumberOfDuplicates(4); 250 SetNumberOfDuplicates(4);
251 ReadTestFile("layer_sort_cubes"); 251 ReadTestFile("layer_sort_cubes");
252 RunSortLayers(); 252 RunSortLayers();
253 } 253 }
254 254
255 } // namespace 255 } // namespace
256 } // namespace cc 256 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.cc ('k') | cc/trees/layer_tree_host_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698