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>
This commit is contained in:
sergiochan
2026-03-11 00:36:17 -07:00
parent fb25eb8f79
commit 3a59c8ec2b
+2 -1
View File
@@ -358,7 +358,8 @@ export class ImageRenderer extends Disposable implements IDisposable {
canvas.style.zIndex = '0';
screenElement.appendChild(canvas);
}
const ctx = canvas.getContext('2d', { alpha: true, desynchronized: true });
// Keep rendering synchronized with resize to avoid blank-frame jitter on some platforms.
const ctx = canvas.getContext('2d', { alpha: true, desynchronized: false });
if (!ctx) {
canvas.remove();
return;