OLD | NEW |
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 } | 204 } |
205 | 205 |
206 TaskGraphRunner* task_graph_runner = RasterWorkerPool::GetTaskGraphRunner(); | 206 TaskGraphRunner* task_graph_runner = RasterWorkerPool::GetTaskGraphRunner(); |
207 DCHECK(task_graph_runner); | 207 DCHECK(task_graph_runner); |
208 | 208 |
209 if (!task_namespace_.IsValid()) | 209 if (!task_namespace_.IsValid()) |
210 task_namespace_ = task_graph_runner->GetNamespaceToken(); | 210 task_namespace_ = task_graph_runner->GetNamespaceToken(); |
211 | 211 |
212 FixedInvalidationPictureLayerTilingClient client( | 212 FixedInvalidationPictureLayerTilingClient client( |
213 layer, gfx::Rect(layer->content_bounds())); | 213 layer, gfx::Rect(layer->content_bounds())); |
214 PictureLayerTilingSet tiling_set(&client, layer->content_bounds()); | 214 PictureLayerTilingSet tiling_set(&client); |
215 | 215 |
216 PictureLayerTiling* tiling = tiling_set.AddTiling(layer->contents_scale_x()); | 216 PictureLayerTiling* tiling = |
| 217 tiling_set.AddTiling(layer->contents_scale_x(), layer->bounds()); |
217 tiling->CreateAllTilesForTesting(); | 218 tiling->CreateAllTilesForTesting(); |
218 for (PictureLayerTiling::CoverageIterator it( | 219 for (PictureLayerTiling::CoverageIterator it( |
219 tiling, layer->contents_scale_x(), layer->visible_content_rect()); | 220 tiling, layer->contents_scale_x(), layer->visible_content_rect()); |
220 it; | 221 it; |
221 ++it) { | 222 ++it) { |
222 DCHECK(*it); | 223 DCHECK(*it); |
223 | 224 |
224 PicturePileImpl* picture_pile = (*it)->picture_pile(); | 225 PicturePileImpl* picture_pile = (*it)->picture_pile(); |
225 gfx::Rect content_rect = (*it)->content_rect(); | 226 gfx::Rect content_rect = (*it)->content_rect(); |
226 float contents_scale = (*it)->contents_scale(); | 227 float contents_scale = (*it)->contents_scale(); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 pixels_rasterized_with_non_solid_color(0), | 268 pixels_rasterized_with_non_solid_color(0), |
268 pixels_rasterized_as_opaque(0), | 269 pixels_rasterized_as_opaque(0), |
269 total_layers(0), | 270 total_layers(0), |
270 total_picture_layers(0), | 271 total_picture_layers(0), |
271 total_picture_layers_with_no_content(0), | 272 total_picture_layers_with_no_content(0), |
272 total_picture_layers_off_screen(0) {} | 273 total_picture_layers_off_screen(0) {} |
273 | 274 |
274 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 275 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
275 | 276 |
276 } // namespace cc | 277 } // namespace cc |
OLD | NEW |