| Summary: | [GPU Process] [Filters 18/23] Remove the result FilterImage from FilterEffect | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||||
| Component: | Layout and Rendering | Assignee: | 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
Said Abou-Hallawa
2021-11-08 13:09:42 PST
Created attachment 448280 [details]
Patch
Created attachment 448302 [details]
Patch
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*. Created attachment 448605 [details]
Patch
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]. |