提交 acb79394 编写于 作者: J Jason Simmons 提交者: GitHub

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

上级 c7c94974
...@@ -30,7 +30,8 @@ void PictureLayer::Paint(PaintContext& context) { ...@@ -30,7 +30,8 @@ void PictureLayer::Paint(PaintContext& context) {
context.canvas.translate(offset_.x(), offset_.y()); context.canvas.translate(offset_.x(), offset_.y());
if (image_) { if (image_) {
context.canvas.drawImage(image_.get(), 0, 0); context.canvas.drawImageRect(image_.get(), picture_->cullRect(), nullptr,
SkCanvas::kFast_SrcRectConstraint);
} else { } else {
context.canvas.drawPicture(picture_.get()); context.canvas.drawPicture(picture_.get());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册