Chromium Code Reviews| Index: cc/raster/raster_source.cc |
| diff --git a/cc/raster/raster_source.cc b/cc/raster/raster_source.cc |
| index 124d5c5674eaa511e9880aa0c3373c326ae60cbf..04508b9cb9a388d6637e2a0ab9933faded563ab0 100644 |
| --- a/cc/raster/raster_source.cc |
| +++ b/cc/raster/raster_source.cc |
| @@ -42,6 +42,7 @@ RasterSource::RasterSource(const RecordingSource* other, bool can_use_lcd_text) |
| 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(const RasterSource* other, bool can_use_lcd_text) |
| @@ -57,6 +58,7 @@ RasterSource::RasterSource(const RasterSource* other, bool can_use_lcd_text) |
| 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_(other->image_decode_cache_) {} |
| RasterSource::~RasterSource() {} |
| @@ -80,7 +82,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(); |
| } |
| @@ -242,6 +245,8 @@ bool RasterSource::PerformSolidColorAnalysis(gfx::Rect layer_rect, |
| TRACE_EVENT0("cc", "RasterSource::PerformSolidColorAnalysis"); |
| layer_rect.Intersect(gfx::Rect(size_)); |
| + layer_rect = |
| + gfx::ScaleToCornerScaledRect(layer_rect, recording_scale_factor_); |
|
vmpstr
2017/07/07 22:56:42
Could you add a couple of tests to raster_source_u
|
| return display_list_->GetColorIfSolidInRect(layer_rect, color); |
| } |