[Webkit-unassigned] [Bug 240802] New: Canvas: putImageData sometimes draws nothing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 23 08:32:50 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=240802

            Bug ID: 240802
           Summary: Canvas: putImageData sometimes draws nothing
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Canvas
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bart.corremans at gmail.com
                CC: dino at apple.com

Created attachment 459678

  --> https://bugs.webkit.org/attachment.cgi?id=459678&action=review

Render loop demonstrating the issue

putImageData will occasionally fail to draw anything.

I first noticed this in Technology Preview in an RDP client implementation, where we use putImageData to update the parts of the screen that have been changed. Scrolling, moving and resizing windows would result in distorted rendering.

Calling getImageData after a putImageData call will circumvent the issue.

I have created what I hope is a decent reproduction of the same issue, as the exact scenario is hard to replicate.

In this simple reproduction, a render loop copies a source canvas 20x20 pixels at a time using requestAnimationFrame.

Allow the loop to run and notice how sometimes, empty squares are left in the target canvas. This occurs less frequently when the browser tab is idle and focused, and more frequently if it is in the background, or if the user interacts with the page (e.g. by selecting text).

You can use the "Enable fix" checkbox to toggle the getImageData workaround.

This does not occur on the released 15.5 version.

I am aware of https://bugs.webkit.org/show_bug.cgi?id=229986, but I cannot reproduce it with the included workaround, so I am unsure if that issue has already been fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220523/19803461/attachment.htm>


More information about the webkit-unassigned mailing list