| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 if (!task_namespace_.IsValid()) | 202 if (!task_namespace_.IsValid()) |
| 203 task_namespace_ = task_graph_runner->GetNamespaceToken(); | 203 task_namespace_ = task_graph_runner->GetNamespaceToken(); |
| 204 | 204 |
| 205 FixedInvalidationPictureLayerTilingClient client( | 205 FixedInvalidationPictureLayerTilingClient client( |
| 206 layer, gfx::Rect(layer->content_bounds())); | 206 layer, gfx::Rect(layer->content_bounds())); |
| 207 | 207 |
| 208 // In this benchmark, we will create a local tiling set and measure how long | 208 // In this benchmark, we will create a local tiling set and measure how long |
| 209 // it takes to rasterize content. As such, the actual settings used here don't | 209 // it takes to rasterize content. As such, the actual settings used here don't |
| 210 // really matter. | 210 // really matter. |
| 211 const LayerTreeSettings& settings = layer->layer_tree_impl()->settings(); | 211 const LayerTreeSettings& settings = layer->layer_tree_impl()->settings(); |
| 212 auto tiling_set = PictureLayerTilingSet::Create( | 212 scoped_ptr<PictureLayerTilingSet> tiling_set = PictureLayerTilingSet::Create( |
| 213 &client, settings.max_tiles_for_interest_area, | 213 &client, settings.max_tiles_for_interest_area, |
| 214 settings.skewport_target_time_in_seconds, | 214 settings.skewport_target_time_in_seconds, |
| 215 settings.skewport_extrapolation_limit_in_content_pixels); | 215 settings.skewport_extrapolation_limit_in_content_pixels); |
| 216 | 216 |
| 217 PictureLayerTiling* tiling = tiling_set->AddTiling(layer->contents_scale_x(), | 217 PictureLayerTiling* tiling = tiling_set->AddTiling(layer->contents_scale_x(), |
| 218 layer->GetRasterSource()); | 218 layer->GetRasterSource()); |
| 219 tiling->CreateAllTilesForTesting(); | 219 tiling->CreateAllTilesForTesting(); |
| 220 for (PictureLayerTiling::CoverageIterator it( | 220 for (PictureLayerTiling::CoverageIterator it( |
| 221 tiling, layer->contents_scale_x(), layer->visible_content_rect()); | 221 tiling, layer->contents_scale_x(), layer->visible_content_rect()); |
| 222 it; | 222 it; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 total_memory_usage(0), | 274 total_memory_usage(0), |
| 275 total_layers(0), | 275 total_layers(0), |
| 276 total_picture_layers(0), | 276 total_picture_layers(0), |
| 277 total_picture_layers_with_no_content(0), | 277 total_picture_layers_with_no_content(0), |
| 278 total_picture_layers_off_screen(0) { | 278 total_picture_layers_off_screen(0) { |
| 279 } | 279 } |
| 280 | 280 |
| 281 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 281 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
| 282 | 282 |
| 283 } // namespace cc | 283 } // namespace cc |
| OLD | NEW |