Index: cc/raster/raster_source.cc |
diff --git a/cc/raster/raster_source.cc b/cc/raster/raster_source.cc |
index 1e7168ce87b214484a0eb4ebf5da45a9d7a66a6a..bb518863046c14c54621787c9e7e3723b3c27a0d 100644 |
--- a/cc/raster/raster_source.cc |
+++ b/cc/raster/raster_source.cc |
@@ -35,6 +35,7 @@ RasterSource::RasterSource(const RecordingSource* other) |
clear_canvas_with_debug_color_(other->clear_canvas_with_debug_color_), |
slow_down_raster_scale_factor_for_debug_( |
other->slow_down_raster_scale_factor_for_debug_), |
+ recording_scale_factor_(other->recording_scale_factor_), |
image_decode_cache_(nullptr) {} |
RasterSource::~RasterSource() = default; |
@@ -57,7 +58,8 @@ void RasterSource::PlaybackToCanvas( |
raster_canvas->clipRect(SkRect::MakeFromIRect(raster_bounds)); |
raster_canvas->translate(raster_transform.translation().x(), |
raster_transform.translation().y()); |
- raster_canvas->scale(raster_transform.scale(), raster_transform.scale()); |
+ raster_canvas->scale(raster_transform.scale() / recording_scale_factor_, |
+ raster_transform.scale() / recording_scale_factor_); |
PlaybackToCanvas(raster_canvas, target_color_space, settings); |
raster_canvas->restore(); |
} |
@@ -219,6 +221,7 @@ bool RasterSource::PerformSolidColorAnalysis(gfx::Rect layer_rect, |
TRACE_EVENT0("cc", "RasterSource::PerformSolidColorAnalysis"); |
layer_rect.Intersect(gfx::Rect(size_)); |
+ layer_rect = gfx::ScaleToRoundedRect(layer_rect, recording_scale_factor_); |
return display_list_->GetColorIfSolidInRect(layer_rect, color); |
} |