NEW 181391
When decoding thread fails to generate a new NativeImage, the main thread has to remove the ImageFrameRequest from commit queue
https://bugs.webkit.org/show_bug.cgi?id=181391
Summary When decoding thread fails to generate a new NativeImage, the main thread has...
Said Abou-Hallawa
Reported 2018-01-08 10:02:44 PST
This is a follow up for <http://trac.webkit.org/changeset/216998>. See the comment https://bugs.webkit.org/show_bug.cgi?id=171614#c20. ImageSource keeps two queues of ImageFrameRequest. The first one, 'm_frameRequestQueue", is shared between the main thread and the decoding thread. The second one, 'm_frameCommitQueue', is only accessible by the main thread. The m_frameCommitQueue is used to keep track of the pending requests. An item is removed only when the main thread caches it. It is also used to tell whether the decoding thread is busy or not without having to have another synchronized object. If the decoding thread fails to generate the NativeImage. We should be doing the following: -- The ImageFrameRequest should be removed from m_frameCommitQueue. -- The Image object should be notified the decoding was finished (even it failed). -- The HTMLImageElement::decode() promise should be rejected. -- BitmapImage::draw() should fall back to synchronous decoding mode.
Attachments
Patch (17.93 KB, patch)
2018-01-08 13:57 PST, Said Abou-Hallawa
mjs: review-
Said Abou-Hallawa
Comment 1 2018-01-08 13:57:12 PST
Maciej Stachowiak
Comment 2 2020-05-30 19:58:00 PDT
Comment on attachment 330733 [details] Patch Unfortunately, this old patch fails to apply.
Note You need to log in before you can comment on or make changes to this bug.