Bug 222343 - [GPU Process] Some DisplayList items may not be replayed back before calling getImageData()
Summary: [GPU Process] Some DisplayList items may not be replayed back before calling ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Said Abou-Hallawa
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-23 21:43 PST by Said Abou-Hallawa
Modified: 2021-03-01 11:58 PST (History)
5 users (show)

See Also:


Attachments
Patch (3.75 KB, patch)
2021-02-23 21:48 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (3.88 KB, patch)
2021-02-26 15:02 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Said Abou-Hallawa 2021-02-23 21:43:17 PST
Ensuring the DisplayList items are replayed to the ImageBuffer before calling getImageData() will fix these tests:

fast/canvas/canvas-arc-connecting-line.html [ Failure ]
fast/canvas/canvas-arc-zero-lineto.html [ Failure ]
fast/canvas/canvas-bezier-same-endpoint.html [ Failure Pass ]
fast/canvas/canvas-blend-image.html [ Failure Pass ]
fast/canvas/canvas-blend-solid.html [ Failure Pass ]
imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-origin.sub.html [ Failure ]
Comment 1 Said Abou-Hallawa 2021-02-23 21:48:30 PST
Created attachment 421383 [details]
Patch
Comment 2 Said Abou-Hallawa 2021-02-26 15:02:45 PST
Created attachment 421710 [details]
Patch
Comment 3 Tim Horton 2021-02-26 17:03:44 PST
Comment on attachment 421710 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=421710&action=review

> Source/WebKit/ChangeLog:10
> +        Make sure all the pending DisplayList items are pushed to the GPUP and
> +        submitted to RemoteImageBuffer before calling the asynchronous method
> +        getImageData().

Is there an assertion we could add somewhere that would have alerted us to this?
Comment 4 Said Abou-Hallawa 2021-03-01 11:20:36 PST
Comment on attachment 421710 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=421710&action=review

>> Source/WebKit/ChangeLog:10
>> +        getImageData().
> 
> Is there an assertion we could add somewhere that would have alerted us to this?

This is going to be costly because we have to know the state of RemoteImageBuffer playing back in WebP. This will require sending a confirmation message from GPUP to WebP for every playback.
Comment 5 Tim Horton 2021-03-01 11:25:57 PST
(In reply to Said Abou-Hallawa from comment #4)
> Comment on attachment 421710 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=421710&action=review
> 
> >> Source/WebKit/ChangeLog:10
> >> +        getImageData().
> > 
> > Is there an assertion we could add somewhere that would have alerted us to this?
> 
> This is going to be costly because we have to know the state of
> RemoteImageBuffer playing back in WebP. This will require sending a
> confirmation message from GPUP to WebP for every playback.

That's probably beyond the scope of a reasonable assertion, then.
Comment 6 EWS 2021-03-01 11:57:08 PST
Committed r273672: <https://commits.webkit.org/r273672>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 421710 [details].
Comment 7 Radar WebKit Bug Importer 2021-03-01 11:58:16 PST
<rdar://problem/74882498>