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

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

Issue 1132443003: cc: Move raster_source from Tile to PrioritizedTile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | cc/layers/layer_impl.h » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 176
177 PictureLayerTiling* tiling = tiling_set->AddTiling(layer->contents_scale_x(), 177 PictureLayerTiling* tiling = tiling_set->AddTiling(layer->contents_scale_x(),
178 layer->GetRasterSource()); 178 layer->GetRasterSource());
179 tiling->CreateAllTilesForTesting(); 179 tiling->CreateAllTilesForTesting();
180 for (PictureLayerTiling::CoverageIterator it( 180 for (PictureLayerTiling::CoverageIterator it(
181 tiling, layer->contents_scale_x(), layer->visible_content_rect()); 181 tiling, layer->contents_scale_x(), layer->visible_content_rect());
182 it; 182 it;
183 ++it) { 183 ++it) {
184 DCHECK(*it); 184 DCHECK(*it);
185 185
186 RasterSource* raster_source = (*it)->raster_source(); 186 RasterSource* raster_source = tiling->raster_source();
vmpstr 2015/05/12 20:18:52 This can move outside of the loop?
hendrikw 2015/05/12 21:40:17 Done.
187 gfx::Rect content_rect = (*it)->content_rect(); 187 gfx::Rect content_rect = (*it)->content_rect();
188 float contents_scale = (*it)->contents_scale(); 188 float contents_scale = (*it)->contents_scale();
189 189
190 base::TimeDelta min_time; 190 base::TimeDelta min_time;
191 bool is_solid_color = false; 191 bool is_solid_color = false;
192 RunBenchmark(raster_source, content_rect, contents_scale, 192 RunBenchmark(raster_source, content_rect, contents_scale,
193 rasterize_repeat_count_, &min_time, &is_solid_color); 193 rasterize_repeat_count_, &min_time, &is_solid_color);
194 194
195 int tile_size = content_rect.width() * content_rect.height(); 195 int tile_size = content_rect.width() * content_rect.height();
196 if (layer->contents_opaque()) 196 if (layer->contents_opaque())
(...skipping 18 matching lines...) Expand all
215 total_memory_usage(0), 215 total_memory_usage(0),
216 total_layers(0), 216 total_layers(0),
217 total_picture_layers(0), 217 total_picture_layers(0),
218 total_picture_layers_with_no_content(0), 218 total_picture_layers_with_no_content(0),
219 total_picture_layers_off_screen(0) { 219 total_picture_layers_off_screen(0) {
220 } 220 }
221 221
222 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} 222 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {}
223 223
224 } // namespace cc 224 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698