Bug 269704 - OffscreenCanvas flickers during rendering
Summary: OffscreenCanvas flickers during rendering
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-02-19 05:19 PST by Ashley Gullen
Modified: 2024-06-30 17:21 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashley Gullen 2024-02-19 05:19:38 PST
We make a web-based game engine Construct (www.construct.net). It supports running the engine both in the DOM with a standard HTML canvas, and in a Web Worker and rendering with OffscreenCanvas. Only in Safari and only when using OffscreenCanvas, sometimes the displayed canvas flickers. It looks like perhaps the canvas is not drawn for a single frame, causing its content to momentarily disappear and then reappear, which looks like a distracting flicker.

Repro URLs:
Using DOM canvas: https://downloads.scirra.com/labs/bugs/canvasflicker/dom/index.html
Using OffscreenCanvas: https://downloads.scirra.com/labs/bugs/canvasflicker/worker/index.html

Steps to reproduce:

1. Visit the first URL using DOM canvas
2. Wait for the content to load
3. Press the "Spin" button several times, waiting for the animation to finish each time
4. Repeat with second URL using OffscreenCanvas

Observed result:

In Safari and when using OffscreenCanvas only, sometimes the canvas momentarily disappears, resulting in a flicker. This can most obviously be seen in the "Flicker check" box at the top. This reproduces in Safari 17 on both macOS and iOS.

Expected result:

No flickering. This is how it appears in DOM mode in Safari, but also both modes always display correctly in Chrome and Firefox on Windows and Chrome on Android.
Comment 1 Radar WebKit Bug Importer 2024-02-26 05:20:13 PST
<rdar://problem/123626765>