Scale picture layers to the picture's cull rect (flutter/engine#2967)

This commit is contained in:
Jason Simmons
2016-08-23 14:46:23 -07:00
committed by GitHub
parent e27ac27b87
commit 70cc2b0e33

View File

@@ -30,7 +30,8 @@ void PictureLayer::Paint(PaintContext& context) {
context.canvas.translate(offset_.x(), offset_.y());
if (image_) {
context.canvas.drawImage(image_.get(), 0, 0);
context.canvas.drawImageRect(image_.get(), picture_->cullRect(), nullptr,
SkCanvas::kFast_SrcRectConstraint);
} else {
context.canvas.drawPicture(picture_.get());
}