Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3419)

Unified Diff: cc/playback/raster_source.cc

Issue 1888613002: cc: Ensure to reapply a shared canvas transform to image hijack canvas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/playback/raster_source_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/playback/raster_source.cc
diff --git a/cc/playback/raster_source.cc b/cc/playback/raster_source.cc
index ab0fd5a333269e4e56a1d4e113166c48b28174cf..7f8606c919eba83cc6e76a3e1ecc053ecef9691b 100644
--- a/cc/playback/raster_source.cc
+++ b/cc/playback/raster_source.cc
@@ -103,8 +103,14 @@ void RasterSource::PlaybackToCanvas(SkCanvas* raster_canvas,
} else if (settings.use_image_hijack_canvas &&
display_list_->MayHaveDiscardableImages()) {
const SkImageInfo& info = raster_canvas->imageInfo();
+
ImageHijackCanvas canvas(info.width(), info.height(),
image_decode_controller_);
+ // Before adding the canvas, make sure that the ImageHijackCanvas is aware
+ // of the current transform, which may affect the clip bounds. Since we
+ // query the clip bounds of the current canvas to get the list of draw
+ // commands to process, this is important to produce correct content.
+ canvas.setMatrix(raster_canvas->getTotalMatrix());
canvas.addCanvas(raster_canvas);
RasterCommon(&canvas, nullptr, canvas_bitmap_rect, canvas_playback_rect,
« no previous file with comments | « no previous file | cc/playback/raster_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698