RESOLVED FIXED 248197
[Filters] Introduce GraphicsStyle and add it to GraphicsContext and GraphicsContextState
https://bugs.webkit.org/show_bug.cgi?id=248197
Summary [Filters] Introduce GraphicsStyle and add it to GraphicsContext and GraphicsC...
Said Abou-Hallawa
Reported 2022-11-21 17:23:58 PST
This will allow applying a GraphicsStyle to all the following drawing commands. Some of FilterEffects can be expressed as GraphicsStyles. Applying a FilterEffect using CoreGraphics will be done by setting GraphicsStyle to the GraphicsContext before drawing the sourceImage of the Filter. The plan is control beginning, ending and nesting GraphicsStyle using transparency layers.
Attachments
Patch (29.60 KB, patch)
2022-11-21 17:38 PST, Said Abou-Hallawa
ews-feeder: commit-queue-
Patch (29.67 KB, patch)
2022-11-21 18:21 PST, Said Abou-Hallawa
no flags
Patch (29.57 KB, patch)
2022-11-21 20:33 PST, Said Abou-Hallawa
simon.fraser: review-
Radar WebKit Bug Importer
Comment 1 2022-11-21 17:32:04 PST
Said Abou-Hallawa
Comment 2 2022-11-21 17:36:50 PST
Said Abou-Hallawa
Comment 3 2022-11-21 17:38:44 PST
Said Abou-Hallawa
Comment 4 2022-11-21 18:21:47 PST
Said Abou-Hallawa
Comment 5 2022-11-21 20:33:26 PST
Simon Fraser (smfr)
Comment 6 2022-11-22 09:37:57 PST
Comment on attachment 463653 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463653&action=review I suggest you add DropShadow first, then add support for gaussian blur and color matrix. > Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:193 > +struct CGGaussianBlurStyle { These need to be wrapped in #if HAVE(CGSTYLE_COLORMATRIX_BLUR) > Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:210 > + kCGStyleGaussianBlur = 3, The new values need to be wrapped in HAVE(CGSTYLE_COLORMATRIX_BLUR) > Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:367 > +CGStyleRef CGStyleCreateGaussianBlur(const CGGaussianBlurStyle*); These need to be wrapped in HAVE(CGSTYLE_COLORMATRIX_BLUR)
Said Abou-Hallawa
Comment 7 2022-11-22 14:20:52 PST
Comment on attachment 463653 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=463653&action=review >> Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:193 >> +struct CGGaussianBlurStyle { > > These need to be wrapped in #if HAVE(CGSTYLE_COLORMATRIX_BLUR) Done. >> Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:210 >> + kCGStyleGaussianBlur = 3, > > The new values need to be wrapped in HAVE(CGSTYLE_COLORMATRIX_BLUR) Done. >> Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:367 >> +CGStyleRef CGStyleCreateGaussianBlur(const CGGaussianBlurStyle*); > > These need to be wrapped in HAVE(CGSTYLE_COLORMATRIX_BLUR) CGStyleCreateShadow2() is not supported on GoldenGate https://ews-build.webkit.org/#/builders/43/builds/30382. So I think we should enable all the CoreGraphics by a single flag: HAVE(CORE_GRAPHICS_STYLES) or HAVE(CG_STYLES).
Said Abou-Hallawa
Comment 8 2022-11-22 14:21:34 PST
EWS
Comment 9 2022-11-23 17:24:27 PST
Committed 256980@main (d6bd013ec6ba): <https://commits.webkit.org/256980@main> Reviewed commits have been landed. Closing PR #6718 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.