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

Set a higher filter quality for drawing raster cache images (#4116)

According to Skia, kLow offers a quality improvement with little cost over
the default kNone

Fixes https://github.com/flutter/flutter/issues/12091
上级 0f79a0cc
......@@ -40,11 +40,13 @@ void PictureLayer::Paint(PaintContext& context) {
context.canvas.translate(offset_.x(), offset_.y());
if (raster_cache_result_.is_valid()) {
SkPaint paint;
paint.setFilterQuality(kLow_SkFilterQuality);
context.canvas.drawImageRect(
raster_cache_result_.image(), // image
raster_cache_result_.source_rect(), // source
raster_cache_result_.destination_rect(), // destination
nullptr, // paint
&paint, // paint
SkCanvas::kStrict_SrcRectConstraint // source constraint
);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册