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

Side by Side Diff: cc/debug/rasterize_and_record_benchmark_impl.cc

Issue 1126793002: cc: Make tiling interest rect calc based on viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove switch entry from chromeos cmdline. Created 5 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/base/switches.cc ('k') | cc/layers/picture_layer_impl.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 "cc/debug/rasterize_and_record_benchmark_impl.h" 5 #include "cc/debug/rasterize_and_record_benchmark_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 FixedInvalidationPictureLayerTilingClient client( 165 FixedInvalidationPictureLayerTilingClient client(
166 layer, gfx::Rect(layer->content_bounds())); 166 layer, gfx::Rect(layer->content_bounds()));
167 167
168 // In this benchmark, we will create a local tiling set and measure how long 168 // In this benchmark, we will create a local tiling set and measure how long
169 // it takes to rasterize content. As such, the actual settings used here don't 169 // it takes to rasterize content. As such, the actual settings used here don't
170 // really matter. 170 // really matter.
171 const LayerTreeSettings& settings = layer->layer_tree_impl()->settings(); 171 const LayerTreeSettings& settings = layer->layer_tree_impl()->settings();
172 scoped_ptr<PictureLayerTilingSet> tiling_set = PictureLayerTilingSet::Create( 172 scoped_ptr<PictureLayerTilingSet> tiling_set = PictureLayerTilingSet::Create(
173 layer->GetTree(), &client, settings.max_tiles_for_interest_area, 173 layer->GetTree(), &client,
174 settings.tiling_interest_area_viewport_multiplier,
174 settings.skewport_target_time_in_seconds, 175 settings.skewport_target_time_in_seconds,
175 settings.skewport_extrapolation_limit_in_content_pixels); 176 settings.skewport_extrapolation_limit_in_content_pixels);
176 177
177 PictureLayerTiling* tiling = tiling_set->AddTiling(layer->contents_scale_x(), 178 PictureLayerTiling* tiling = tiling_set->AddTiling(layer->contents_scale_x(),
178 layer->GetRasterSource()); 179 layer->GetRasterSource());
179 tiling->CreateAllTilesForTesting(); 180 tiling->CreateAllTilesForTesting();
180 for (PictureLayerTiling::CoverageIterator it( 181 for (PictureLayerTiling::CoverageIterator it(
181 tiling, layer->contents_scale_x(), layer->visible_content_rect()); 182 tiling, layer->contents_scale_x(), layer->visible_content_rect());
182 it; 183 it;
183 ++it) { 184 ++it) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 total_memory_usage(0), 216 total_memory_usage(0),
216 total_layers(0), 217 total_layers(0),
217 total_picture_layers(0), 218 total_picture_layers(0),
218 total_picture_layers_with_no_content(0), 219 total_picture_layers_with_no_content(0),
219 total_picture_layers_off_screen(0) { 220 total_picture_layers_off_screen(0) {
220 } 221 }
221 222
222 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} 223 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {}
223 224
224 } // namespace cc 225 } // namespace cc
OLDNEW
« no previous file with comments | « cc/base/switches.cc ('k') | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698