提交 ac830431 编写于 作者: A Adam Barth

Fix order of matrix operations

When rasterzing with a non-zero left and top offset, we need to apply the scale
first so that we're translating in the correct coordinate system.

Fixes https://github.com/flutter/flutter/issues/1292
上级 1f9858cb
......@@ -84,8 +84,8 @@ skia::RefPtr<SkImage> RasterCache::GetPrerolledImage(GrContext* context,
if (surface) {
SkCanvas* canvas = surface->getCanvas();
canvas->clear(SK_ColorTRANSPARENT);
canvas->translate(-rect.left(), -rect.top());
canvas->scale(scaleX, scaleY);
canvas->translate(-rect.left(), -rect.top());
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.
先完成此消息的编辑!
想要评论请 注册