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

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

Issue 1413153014: Add a flag for enabling compositor property trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
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 "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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 EndTest(); 101 EndTest();
102 } 102 }
103 103
104 void DoCalcDrawPropertiesImpl(bool can_render_to_separate_surface, 104 void DoCalcDrawPropertiesImpl(bool can_render_to_separate_surface,
105 int max_texture_size, 105 int max_texture_size,
106 LayerTreeImpl* active_tree, 106 LayerTreeImpl* active_tree,
107 LayerTreeHostImpl* host_impl) { 107 LayerTreeHostImpl* host_impl) {
108 LayerImplList update_list; 108 LayerImplList update_list;
109 PropertyTrees property_trees; 109 PropertyTrees property_trees;
110 bool verify_property_trees = false; 110 bool verify_property_trees = false;
111 bool use_property_trees = false;
111 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs( 112 LayerTreeHostCommon::CalcDrawPropsImplInputs inputs(
112 active_tree->root_layer(), active_tree->DrawViewportSize(), 113 active_tree->root_layer(), active_tree->DrawViewportSize(),
113 host_impl->DrawTransform(), active_tree->device_scale_factor(), 114 host_impl->DrawTransform(), active_tree->device_scale_factor(),
114 active_tree->current_page_scale_factor(), 115 active_tree->current_page_scale_factor(),
115 active_tree->InnerViewportContainerLayer(), 116 active_tree->InnerViewportContainerLayer(),
116 active_tree->InnerViewportScrollLayer(), 117 active_tree->InnerViewportScrollLayer(),
117 active_tree->OuterViewportScrollLayer(), 118 active_tree->OuterViewportScrollLayer(),
118 active_tree->elastic_overscroll()->Current(active_tree->IsActiveTree()), 119 active_tree->elastic_overscroll()->Current(active_tree->IsActiveTree()),
119 active_tree->OverscrollElasticityLayer(), max_texture_size, 120 active_tree->OverscrollElasticityLayer(), max_texture_size,
120 host_impl->settings().can_use_lcd_text, 121 host_impl->settings().can_use_lcd_text,
121 host_impl->settings().layers_always_allowed_lcd_text, 122 host_impl->settings().layers_always_allowed_lcd_text,
122 can_render_to_separate_surface, 123 can_render_to_separate_surface,
123 host_impl->settings().layer_transforms_should_scale_layer_contents, 124 host_impl->settings().layer_transforms_should_scale_layer_contents,
124 verify_property_trees, &update_list, 0, &property_trees); 125 verify_property_trees, use_property_trees, &update_list, 0,
126 &property_trees);
125 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 127 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
126 } 128 }
127 }; 129 };
128 130
129 class BspTreePerfTest : public CalcDrawPropsTest { 131 class BspTreePerfTest : public CalcDrawPropsTest {
130 public: 132 public:
131 BspTreePerfTest() : num_duplicates_(1) {} 133 BspTreePerfTest() : num_duplicates_(1) {}
132 void RunSortLayers() { RunTest(false, false); } 134 void RunSortLayers() { RunTest(false, false); }
133 135
134 void SetNumberOfDuplicates(int num_duplicates) { 136 void SetNumberOfDuplicates(int num_duplicates) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 262
261 TEST_F(BspTreePerfTest, BspTreeCubes_4) { 263 TEST_F(BspTreePerfTest, BspTreeCubes_4) {
262 SetTestName("bsp_tree_cubes_4"); 264 SetTestName("bsp_tree_cubes_4");
263 SetNumberOfDuplicates(4); 265 SetNumberOfDuplicates(4);
264 ReadTestFile("layer_sort_cubes"); 266 ReadTestFile("layer_sort_cubes");
265 RunSortLayers(); 267 RunSortLayers();
266 } 268 }
267 269
268 } // namespace 270 } // namespace
269 } // namespace cc 271 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698