| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 gfx::Rect(layer->bounds())); | 167 gfx::Rect(layer->bounds())); |
| 168 | 168 |
| 169 // In this benchmark, we will create a local tiling set and measure how long | 169 // In this benchmark, we will create a local tiling set and measure how long |
| 170 // it takes to rasterize content. As such, the actual settings used here don't | 170 // it takes to rasterize content. As such, the actual settings used here don't |
| 171 // really matter. | 171 // really matter. |
| 172 const LayerTreeSettings& settings = layer->layer_tree_impl()->settings(); | 172 const LayerTreeSettings& settings = layer->layer_tree_impl()->settings(); |
| 173 std::unique_ptr<PictureLayerTilingSet> tiling_set = | 173 std::unique_ptr<PictureLayerTilingSet> tiling_set = |
| 174 PictureLayerTilingSet::Create( | 174 PictureLayerTilingSet::Create( |
| 175 layer->GetTree(), &client, settings.tiling_interest_area_padding, | 175 layer->GetTree(), &client, settings.tiling_interest_area_padding, |
| 176 settings.skewport_target_time_in_seconds, | 176 settings.skewport_target_time_in_seconds, |
| 177 settings.skewport_extrapolation_limit_in_content_pixels); | 177 settings.skewport_extrapolation_limit_in_screen_pixels); |
| 178 | 178 |
| 179 PictureLayerTiling* tiling = | 179 PictureLayerTiling* tiling = |
| 180 tiling_set->AddTiling(1.f, layer->GetRasterSource()); | 180 tiling_set->AddTiling(1.f, layer->GetRasterSource()); |
| 181 tiling->set_resolution(HIGH_RESOLUTION); | 181 tiling->set_resolution(HIGH_RESOLUTION); |
| 182 tiling->CreateAllTilesForTesting(); | 182 tiling->CreateAllTilesForTesting(); |
| 183 RasterSource* raster_source = tiling->raster_source().get(); | 183 RasterSource* raster_source = tiling->raster_source().get(); |
| 184 for (PictureLayerTiling::CoverageIterator it(tiling, 1.f, | 184 for (PictureLayerTiling::CoverageIterator it(tiling, 1.f, |
| 185 layer->visible_layer_rect()); | 185 layer->visible_layer_rect()); |
| 186 it; ++it) { | 186 it; ++it) { |
| 187 DCHECK(*it); | 187 DCHECK(*it); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 217 total_memory_usage(0), | 217 total_memory_usage(0), |
| 218 total_layers(0), | 218 total_layers(0), |
| 219 total_picture_layers(0), | 219 total_picture_layers(0), |
| 220 total_picture_layers_with_no_content(0), | 220 total_picture_layers_with_no_content(0), |
| 221 total_picture_layers_off_screen(0) { | 221 total_picture_layers_off_screen(0) { |
| 222 } | 222 } |
| 223 | 223 |
| 224 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 224 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
| 225 | 225 |
| 226 } // namespace cc | 226 } // namespace cc |
| OLD | NEW |