Bug 234099

Summary: [GPU Process] [Filters] Add the encoding and decoding for FEImage
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: Layout and RenderingAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: annulen, bfulgham, changseok, dino, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, kondapallykalyan, pdr, ryuan.choi, schenney, sergio, simon.fraser, webkit-bug-importer, wenson_hsieh, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 231253, 233989    
Attachments:
Description Flags
Patch
wenson_hsieh: review+
Patch none

Description Said Abou-Hallawa 2021-12-09 12:49:01 PST
The encoding and decoding of FEImage requires special handling. FEImage needs to encode and decode the RenderingResourceIdentifier of the Image or the ImageBuffer of its SourceImage. FEImage needs to send the Image or the ImageBuffer of its SourceImage separately to GPUProcess. But before applying the filter all the FEImages need to resolve their RenderingResourceIdentifiers back to an Image or an ImageBuffer.
Comment 1 Said Abou-Hallawa 2021-12-09 15:35:53 PST
Created attachment 446622 [details]
Patch
Comment 2 Said Abou-Hallawa 2021-12-09 15:48:12 PST
There should be two follow-up patches:

bug 234108: Convert FilterEffectVector to be a Vector of Ref<FilterEffect>
bug 234109: Move FEImage to the 'platform' directory

bug 234109 is essential to remove the layering violation which this patch is introducing by including the header file SVGFEImage.h in the source file DisplayListRecorder.cpp.
Comment 3 Wenson Hsieh 2021-12-09 16:28:58 PST
Comment on attachment 446622 [details]
Patch

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

r=mews

> Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:248
> +            Ref<Image> image = BitmapImage::create(RefPtr<NativeImage> { nativeImage });

Nit - I don't think this local variable adds much here.
Comment 4 Said Abou-Hallawa 2021-12-09 17:44:27 PST
Created attachment 446645 [details]
Patch
Comment 5 Said Abou-Hallawa 2021-12-09 17:45:35 PST
Comment on attachment 446622 [details]
Patch

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

>> Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:248
>> +            Ref<Image> image = BitmapImage::create(RefPtr<NativeImage> { nativeImage });
> 
> Nit - I don't think this local variable adds much here.

The local variable was removed.
Comment 6 EWS 2021-12-09 18:40:20 PST
Committed r286824 (245058@main): <https://commits.webkit.org/245058@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446645 [details].
Comment 7 Radar WebKit Bug Importer 2021-12-09 18:41:16 PST
<rdar://problem/86302383>