Bug 222960 - [GPU Process] ImageBitmap should release its ImageBuffer in the main thread
Summary: [GPU Process] ImageBitmap should release its ImageBuffer in the main thread
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
: 222879 (view as bug list)
Depends on:
Blocks: 222835
  Show dependency treegraph
 
Reported: 2021-03-08 23:53 PST by Said Abou-Hallawa
Modified: 2021-03-12 10:59 PST (History)
8 users (show)

See Also:


Attachments
Patch (1.59 KB, patch)
2021-03-08 23:55 PST, Said Abou-Hallawa
simon.fraser: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (1.74 KB, patch)
2021-03-09 10:45 PST, Said Abou-Hallawa
no flags Details | Formatted Diff | Diff
Patch (1.73 KB, patch)
2021-03-09 11:08 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-03-08 23:53:01 PST
The ImageBuffer of the ImageBitmap should be deleted on the main thread only since its deletion may require sending messages to the GPUP.
Comment 1 Said Abou-Hallawa 2021-03-08 23:55:13 PST
Created attachment 422668 [details]
Patch
Comment 2 Simon Fraser (smfr) 2021-03-09 10:07:16 PST
Comment on attachment 422668 [details]
Patch

It this covered by tests?
Comment 3 Said Abou-Hallawa 2021-03-09 10:45:44 PST
Created attachment 422728 [details]
Patch
Comment 4 Said Abou-Hallawa 2021-03-09 10:46:12 PST
(In reply to Simon Fraser (smfr) from comment #2)
> Comment on attachment 422668 [details]
> Patch
> 
> It this covered by tests?

imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/createImageBitmap-in-worker-transfer.html
Comment 5 Chris Dumez 2021-03-09 10:46:57 PST
Comment on attachment 422728 [details]
Patch

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

> Source/WebCore/html/ImageBitmap.cpp:848
> +        callOnMainThread([imageBuffer = WTFMove(imageBuffer)]() mutable { });

I doubt the mutable and () are needed.
Comment 6 Simon Fraser (smfr) 2021-03-09 10:49:11 PST
(In reply to Said Abou-Hallawa from comment #4)
> (In reply to Simon Fraser (smfr) from comment #2)
> > Comment on attachment 422668 [details]
> > Patch
> > 
> > It this covered by tests?
> 
> imported/w3c/web-platform-tests/html/canvas/element/imagebitmap/
> createImageBitmap-in-worker-transfer.html

Please note in the changeling.
Comment 7 Said Abou-Hallawa 2021-03-09 11:08:43 PST
Created attachment 422731 [details]
Patch
Comment 8 EWS 2021-03-09 12:03:33 PST
Committed r274164: <https://commits.webkit.org/r274164>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422731 [details].
Comment 9 Radar WebKit Bug Importer 2021-03-09 12:04:39 PST
<rdar://problem/75228853>
Comment 10 Said Abou-Hallawa 2021-03-12 10:59:07 PST
*** Bug 222879 has been marked as a duplicate of this bug. ***