<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>269704</bug_id>
          
          <creation_ts>2024-02-19 05:19:38 -0800</creation_ts>
          <short_desc>OffscreenCanvas flickers during rendering</short_desc>
          <delta_ts>2024-06-30 17:21:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Canvas</component>
          <version>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=269544</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ashley Gullen">ashley</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>heycam</cc>
    
    <cc>hunter</cc>
    
    <cc>mattwoodrow</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2015072</commentid>
    <comment_count>0</comment_count>
    <who name="Ashley Gullen">ashley</who>
    <bug_when>2024-02-19 05:19:38 -0800</bug_when>
    <thetext>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 &quot;Spin&quot; 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 &quot;Flicker check&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2016826</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-02-26 05:20:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/123626765&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>