未验证 提交 74f48cd5 编写于 作者: F Ferhat 提交者: GitHub

Fix devicepixel ratio reset problem when replaying clip stack (#15327)

* Fix devicepixel ratio reset problem when replaying clip stack
* Simplify setTransform
上级 a669095f
......@@ -140,7 +140,9 @@ class _CanvasPool extends _SaveStackTracking {
int clipDepth, Matrix4 transform, List<_SaveClipEntry> clipStack) {
final html.CanvasRenderingContext2D ctx = _context;
if (!transform.isIdentity()) {
ctx.setTransform(transform[0], transform[1], transform[4], transform[5],
final double ratio = EngineWindow.browserDevicePixelRatio;
ctx.setTransform(ratio, 0, 0, ratio, 0, 0);
ctx.transform(transform[0], transform[1], transform[4], transform[5],
transform[12], transform[13]);
}
if (clipStack != null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册