Bug 232469

Summary: [GPU Process] [Filters 4/23] Make CSSFilter be a composite of FilterFunctions
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: Layout and RenderingAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, dino, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, hta, jer.noble, kondapallykalyan, macpherson, menard, pdr, philipj, schenney, sergio, simon.fraser, tommyw, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=233008
https://bugs.webkit.org/show_bug.cgi?id=234918
Bug Depends on:    
Bug Blocks: 231253    
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch for review
simon.fraser: review+
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
none
Patch none

Said Abou-Hallawa
Reported 2021-10-28 22:35:49 PDT
This will make CSSFilter have an item of SVGFilter in this list of FilterFunctions.
Attachments
Patch (151.60 KB, patch)
2021-10-28 22:55 PDT, Said Abou-Hallawa
ews-feeder: commit-queue-
Patch for review (56.67 KB, patch)
2021-10-28 22:59 PDT, Said Abou-Hallawa
simon.fraser: review+
Patch (155.29 KB, patch)
2021-10-31 18:01 PDT, Said Abou-Hallawa
ews-feeder: commit-queue-
Patch (69.94 KB, patch)
2021-11-10 12:39 PST, Said Abou-Hallawa
ews-feeder: commit-queue-
Patch (66.43 KB, patch)
2021-11-10 14:38 PST, Said Abou-Hallawa
no flags
Patch (66.49 KB, patch)
2021-11-10 19:58 PST, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2021-10-28 22:55:27 PDT
Said Abou-Hallawa
Comment 2 2021-10-28 22:59:10 PDT
Created attachment 442785 [details] Patch for review
Simon Fraser (smfr)
Comment 3 2021-10-29 12:03:34 PDT
Comment on attachment 442785 [details] Patch for review View in context: https://bugs.webkit.org/attachment.cgi?id=442785&action=review > Source/WebCore/ChangeLog:8 > + In this patch, the CSS referenced filter is built as an SVGFilter and it "reference filter" > Source/WebCore/css/CSSFilterImageValue.cpp:120 > + auto texture = ImageBuffer::create(size, renderingMode, 1, DestinationColorSpace::SRGB(), PixelFormat::BGRA8); texture is a weird name for this. > Source/WebCore/css/CSSFilterImageValue.cpp:130 > + auto cssFilter = CSSFilter::create(m_filterOperations, renderingMode); > + > cssFilter->setSourceImageRect(imageRect); > if (!cssFilter->build(renderer, m_filterOperations, FilterConsumer::FilterFunction)) Why do we have to pass m_filterOperations both to the constructor, and to the build() function? > Source/WebCore/rendering/CSSFilter.cpp:223 > + auto builder = makeUnique<SVGFilterBuilder>(); Can SVGFilterBuilder just be on the stack? > Source/WebCore/rendering/RenderLayerFilters.h:66 > + GraphicsContext* beginFilterEffect(RenderElement&, const LayoutRect& filterBoxRect, const LayoutRect& dirtyRect, const LayoutRect& layerRepaintRect, GraphicsContext& destinationContext); I tend to prefer GraphicsContext& destinationContext as the first argument. > Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp:436 > + auto builder = makeUnique<SVGFilterBuilder>(); Can this live on the stack?
Said Abou-Hallawa
Comment 4 2021-10-31 17:18:41 PDT
Some of the layout tests are failing because of the need to set the sourceImageRect before building the CSSFilter. The sourceImageRect has to include the Outsets of the FilterEffects. So currently to fix these tests we need to set the sourceImageRect twice and to build the CSSFilter twice. The plan to remove this dependency and be able to build the CSSFilter without having to set sourceImageRect and have the FilterEffects be able to calculate the outsets without knowing the sourceImageRect. The reset of the failures are happing because of the color space which should be fixed once the calculation of the result color space out of the operating color space. So for now, I am going to skip these few tests and remove them by the end.
Said Abou-Hallawa
Comment 5 2021-10-31 18:01:03 PDT
Radar WebKit Bug Importer
Comment 6 2021-11-04 22:36:17 PDT
Said Abou-Hallawa
Comment 7 2021-11-10 12:39:25 PST
Said Abou-Hallawa
Comment 8 2021-11-10 14:38:21 PST
Said Abou-Hallawa
Comment 9 2021-11-10 19:58:07 PST
EWS
Comment 10 2021-11-10 20:31:14 PST
Committed r285618 (244119@main): <https://commits.webkit.org/244119@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 443899 [details].
Note You need to log in before you can comment on or make changes to this bug.