Index: cc/debug/rasterize_and_record_benchmark_impl.cc |
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc |
index 7e061296c4a4e0aaca90612af72184d7ea0222c4..bd2e2b7100353ab86cb5012fc60dc53ed1bb9e75 100644 |
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc |
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc |
@@ -28,7 +28,7 @@ const int kDefaultRasterizeRepeatCount = 100; |
void RunBenchmark(RasterSource* raster_source, |
const gfx::Rect& content_rect, |
- const gfx::SizeF& raster_scales, |
+ float raster_scale, |
size_t repeat_count, |
base::TimeDelta* min_time, |
bool* is_solid_color) { |
@@ -46,7 +46,7 @@ void RunBenchmark(RasterSource* raster_source, |
kTimeCheckInterval); |
SkColor color = SK_ColorTRANSPARENT; |
*is_solid_color = raster_source->PerformSolidColorAnalysis( |
- content_rect, raster_scales, &color); |
+ content_rect, raster_scale, &color); |
do { |
SkBitmap bitmap; |
@@ -54,9 +54,8 @@ void RunBenchmark(RasterSource* raster_source, |
content_rect.height())); |
SkCanvas canvas(bitmap); |
- DCHECK_EQ(raster_scales.width(), raster_scales.height()); |
raster_source->PlaybackToCanvas(&canvas, content_rect, content_rect, |
- ScaleTranslate2d(raster_scales.width(), gfx::Vector2dF()), |
+ ScaleTranslate2d(raster_scale, gfx::Vector2dF()), |
RasterSource::PlaybackSettings()); |
timer.NextLap(); |
@@ -180,7 +179,7 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { |
settings.max_preraster_distance_in_screen_pixels); |
PictureLayerTiling* tiling = |
- tiling_set->AddTiling(1.f, layer->GetRasterSource()); |
+ tiling_set->AddTiling(ScaleTranslate2d(), layer->GetRasterSource()); |
tiling->set_resolution(HIGH_RESOLUTION); |
tiling->CreateAllTilesForTesting(); |
RasterSource* raster_source = tiling->raster_source().get(); |
@@ -190,11 +189,12 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) { |
DCHECK(*it); |
gfx::Rect content_rect = (*it)->content_rect(); |
- const gfx::SizeF& raster_scales = (*it)->raster_scales(); |
+ float raster_scale = (*it)->raster_transform().scale(); |
+ DCHECK_EQ(1.f, raster_scale); |
base::TimeDelta min_time; |
bool is_solid_color = false; |
- RunBenchmark(raster_source, content_rect, raster_scales, |
+ RunBenchmark(raster_source, content_rect, raster_scale, |
rasterize_repeat_count_, &min_time, &is_solid_color); |
int tile_size = content_rect.width() * content_rect.height(); |