Bug 232840

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

Said Abou-Hallawa
Reported 2021-11-08 13:09:42 PST
A FilterEffect should be applied to any input FilterImages and results a FilterImage. These FilterImages will managed by the Filter class and should be cached by the creator of the source ImageBuffer. In the case of the GPU Process, they will be cached by RemoteResourceCache.
Attachments
Patch (45.89 KB, patch)
2022-01-04 04:12 PST, Said Abou-Hallawa
no flags
Patch (46.54 KB, patch)
2022-01-04 09:38 PST, Said Abou-Hallawa
darin: review+
Patch (47.98 KB, patch)
2022-01-07 09:46 PST, Said Abou-Hallawa
no flags
Radar WebKit Bug Importer
Comment 1 2021-11-15 13:11:00 PST
Said Abou-Hallawa
Comment 2 2022-01-04 04:12:42 PST
Said Abou-Hallawa
Comment 3 2022-01-04 09:38:37 PST
Darin Adler
Comment 4 2022-01-04 21:48:21 PST
Comment on attachment 448302 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448302&action=review > Source/WebCore/platform/graphics/filters/FilterResults.cpp:40 > + for (auto input : inputs) { Using "auto" here means we copy each Ref<FilterImage>. I think that instead we should use "auto&" and save a bit of reference count churn. > Source/WebCore/platform/graphics/filters/FilterResults.cpp:46 > + auto addResult = m_resultReferences.ensure(input, [] { > + return FilterEffectSet(); > + }); > + > + auto& references = addResult.iterator->value; > + references.add(effect); This can just use add, because FilterEffectSet() is a null pointer, very cheap to construct and destruct. Can write this as a one-liner. m_resultReferences.add(input, { }).iterator->value.add(effect); > Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h:52 > + void appendEffectToEffectRenderer(FilterEffect*, RenderObject*); This should take a FilterEffect& instead of a FilterEffect*.
Said Abou-Hallawa
Comment 5 2022-01-07 09:46:49 PST
EWS
Comment 6 2022-01-07 14:22:16 PST
Committed r287782 (245842@main): <https://commits.webkit.org/245842@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448605 [details].
Note You need to log in before you can comment on or make changes to this bug.