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

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

Issue 2693703010: cc: Remove support for disabling non-root render surfaces. (Closed)
Patch Set: softwaredraw-remove-no-surfaces: rebase Created 3 years, 7 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/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_common_unittest.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 public: 79 public:
80 void RunCalcDrawProps() { RunTest(CompositorMode::SINGLE_THREADED); } 80 void RunCalcDrawProps() { RunTest(CompositorMode::SINGLE_THREADED); }
81 81
82 void BeginTest() override { PostSetNeedsCommitToMainThread(); } 82 void BeginTest() override { PostSetNeedsCommitToMainThread(); }
83 83
84 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { 84 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override {
85 timer_.Reset(); 85 timer_.Reset();
86 LayerTreeImpl* active_tree = host_impl->active_tree(); 86 LayerTreeImpl* active_tree = host_impl->active_tree();
87 87
88 do { 88 do {
89 bool can_render_to_separate_surface = true;
90 int max_texture_size = 8096; 89 int max_texture_size = 8096;
91 DoCalcDrawPropertiesImpl(can_render_to_separate_surface, 90 DoCalcDrawPropertiesImpl(max_texture_size, active_tree, host_impl);
92 max_texture_size,
93 active_tree,
94 host_impl);
95 91
96 timer_.NextLap(); 92 timer_.NextLap();
97 } while (!timer_.HasTimeLimitExpired()); 93 } while (!timer_.HasTimeLimitExpired());
98 94
99 EndTest(); 95 EndTest();
100 } 96 }
101 97
102 void DoCalcDrawPropertiesImpl(bool can_render_to_separate_surface, 98 void DoCalcDrawPropertiesImpl(int max_texture_size,
103 int max_texture_size,
104 LayerTreeImpl* active_tree, 99 LayerTreeImpl* active_tree,
105 LayerTreeHostImpl* host_impl) { 100 LayerTreeHostImpl* host_impl) {
106 RenderSurfaceList update_list; 101 RenderSurfaceList update_list;
107 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( 102 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs(
108 active_tree->root_layer_for_testing(), active_tree->DrawViewportSize(), 103 active_tree->root_layer_for_testing(), active_tree->DrawViewportSize(),
109 host_impl->DrawTransform(), active_tree->device_scale_factor(), 104 host_impl->DrawTransform(), active_tree->device_scale_factor(),
110 active_tree->current_page_scale_factor(), 105 active_tree->current_page_scale_factor(),
111 active_tree->InnerViewportContainerLayer(), 106 active_tree->InnerViewportContainerLayer(),
112 active_tree->InnerViewportScrollLayer(), 107 active_tree->InnerViewportScrollLayer(),
113 active_tree->OuterViewportScrollLayer(), 108 active_tree->OuterViewportScrollLayer(),
114 active_tree->elastic_overscroll()->Current(active_tree->IsActiveTree()), 109 active_tree->elastic_overscroll()->Current(active_tree->IsActiveTree()),
115 active_tree->OverscrollElasticityLayer(), max_texture_size, 110 active_tree->OverscrollElasticityLayer(), max_texture_size,
116 can_render_to_separate_surface,
117 host_impl->settings().layer_transforms_should_scale_layer_contents, 111 host_impl->settings().layer_transforms_should_scale_layer_contents,
118 &update_list, active_tree->property_trees()); 112 &update_list, active_tree->property_trees());
119 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 113 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
120 } 114 }
121 }; 115 };
122 116
123 TEST_F(CalcDrawPropsTest, TenTen) { 117 TEST_F(CalcDrawPropsTest, TenTen) {
124 SetTestName("10_10"); 118 SetTestName("10_10");
125 ReadTestFile("10_10_layer_tree"); 119 ReadTestFile("10_10_layer_tree");
126 RunCalcDrawProps(); 120 RunCalcDrawProps();
(...skipping 12 matching lines...) Expand all
139 } 133 }
140 134
141 TEST_F(CalcDrawPropsTest, TouchRegionHeavy) { 135 TEST_F(CalcDrawPropsTest, TouchRegionHeavy) {
142 SetTestName("touch_region_heavy"); 136 SetTestName("touch_region_heavy");
143 ReadTestFile("touch_region_heavy"); 137 ReadTestFile("touch_region_heavy");
144 RunCalcDrawProps(); 138 RunCalcDrawProps();
145 } 139 }
146 140
147 } // namespace 141 } // namespace
148 } // namespace cc 142 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698