mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Scale picture layers to the picture's cull rect (flutter/engine#2967)
This commit is contained in:
parent
e27ac27b87
commit
70cc2b0e33
@ -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());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user