Skip to content

Commit 3a59c8e

Browse files
committed
Fix image layer resize jitter
Disable desynchronized 2D canvas mode for image layers so resize paint stays synchronized and avoids blank-frame jitter on some platforms. Signed-off-by: sergiochan <yuheng9211@qq.com>
1 parent fb25eb8 commit 3a59c8e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

addons/addon-image/src/ImageRenderer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ export class ImageRenderer extends Disposable implements IDisposable {
358358
canvas.style.zIndex = '0';
359359
screenElement.appendChild(canvas);
360360
}
361-
const ctx = canvas.getContext('2d', { alpha: true, desynchronized: true });
361+
// Keep rendering synchronized with resize to avoid blank-frame jitter on some platforms.
362+
const ctx = canvas.getContext('2d', { alpha: true, desynchronized: false });
362363
if (!ctx) {
363364
canvas.remove();
364365
return;

0 commit comments

Comments
 (0)