Bug 236296

Summary: DisplayListRecorder implementations are not able to obtain extra information out of source ImageBuffers
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: CanvasAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, sabouhallawa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description Kimmo Kinnunen 2022-02-08 03:47:07 PST
DisplayListRecorder implementations are not able to obtain extra information out of source ImageBitmaps
Comment 1 Kimmo Kinnunen 2022-02-08 03:52:03 PST
Created attachment 451233 [details]
Patch
Comment 2 Said Abou-Hallawa 2022-02-08 14:28:46 PST
Comment on attachment 451233 [details]
Patch

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

> Source/WebCore/ChangeLog:3
> +        DisplayListRecorder implementations are not able to obtain extra information out of source ImageBitmaps

I think you meant ImageBuffer since ImageBitmap is a class used for offscreen canvas.

> Source/WebCore/ChangeLog:8
> +        Pass ImageBitmap& to various recording commands instead of the resource identifier.

Pass ImageBuffer...

> Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:162
> -        recordDrawFilteredImageBuffer({ }, sourceImageRect, filter);
> +        recordDrawFilteredImageBuffer(sourceImageRect, filter);

Why do we have two versions of recordDrawFilteredImageBuffer()? Can't we have one which takes ImageBuffer*. Some filter effects like <feFlood> do not require sourceImage and this is why it is a pointer.
Comment 3 Kimmo Kinnunen 2022-02-09 02:16:35 PST
Created attachment 451351 [details]
Patch for landing
Comment 4 Kimmo Kinnunen 2022-02-09 03:58:54 PST
(In reply to Said Abou-Hallawa from comment #2)
> I think you meant ImageBuffer since ImageBitmap is a class used for
> offscreen canvas.

> Pass ImageBuffer...

> 
> Why do we have two versions of recordDrawFilteredImageBuffer()? Can't we
> have one which takes ImageBuffer*. Some filter effects like <feFlood> do not
> require sourceImage and this is why it is a pointer.

Thank for looking, changed.
Comment 5 Kimmo Kinnunen 2022-02-09 03:59:19 PST
Created attachment 451355 [details]
Patch for landing
Comment 6 EWS 2022-02-09 11:36:38 PST
Committed r289492 (247030@main): <https://commits.webkit.org/247030@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 451355 [details].
Comment 7 Radar WebKit Bug Importer 2022-02-09 11:37:39 PST
<rdar://problem/88704119>