提交 17ed6993 编写于 作者: A Adam Barth

Stocks FAB "+" sometimes teleports to near the top left

The matrix argument to drawPicture doesn't seem to do what we want exactly.
Instead, use the normal matrix in the canvas. Also, handle cull rects with
non-zero left and top coordinates.

Fixes #1229
上级 a0e2a6d2
......@@ -84,8 +84,9 @@ skia::RefPtr<SkImage> RasterCache::GetPrerolledImage(GrContext* context,
if (surface) {
SkCanvas* canvas = surface->getCanvas();
canvas->clear(SK_ColorTRANSPARENT);
SkMatrix matrix = SkMatrix::MakeScale(scaleX, scaleY);
canvas->drawPicture(picture, &matrix, nullptr);
canvas->translate(-rect.left(), -rect.right());
canvas->scale(scaleX, scaleY);
canvas->drawPicture(picture);
entry.image = skia::AdoptRef(surface->newImageSnapshot());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册