[Webkit-unassigned] [Bug 241402] New: Decoded image data is not reused by canvas causing long task blocking on the main thread

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 7 22:04:13 PDT 2022


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

            Bug ID: 241402
           Summary: Decoded image data is not reused by canvas causing
                    long task blocking on the main thread
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Canvas
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: xidorn-webkit at upsuper.org
                CC: dino at apple.com

Created attachment 460082

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

testcase

STR:
1. download the attachment and serve it and open it
2. click the button in the page

Expected result:
The decoding takes sometime, but drawing is instant, and there is no long task detected on the main thread.

Actual result:
Both the decoding and the drawing takes roughly the same amount of time, and there is a long task indicates the main thread is blocked.


Seemingly that the drawing the image on canvas then `getImageData` forces a decoding of the image even if the image is already decoded through `img.decode()`. It makes it hard to avoid a long task on main thread when dealing with large images.

Blink has similar issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1334448

On Gecko, I get the expected result.

-- 
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/20220608/e2382dcb/attachment-0001.htm>


More information about the webkit-unassigned mailing list