[webkit-changes] [WebKit/WebKit] 318e17: [Filters] Enable CoreGraphics drop shadow filter

Said Abou-Hallawa noreply at github.com
Fri Sep 22 23:52:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 318e17617453d0d42d4cd3f8d425634422516e7c
      https://github.com/WebKit/WebKit/commit/318e17617453d0d42d4cd3f8d425634422516e7c
  Author: Said Abou-Hallawa <said at apple.com>
  Date:   2023-09-22 (Fri, 22 Sep 2023)

  Changed paths:
    M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
    M Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp
    M Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp

  Log Message:
  -----------
  [Filters] Enable CoreGraphics drop shadow filter
https://bugs.webkit.org/show_bug.cgi?id=261925
rdar://98820279

Reviewed by Cameron McCormack.

Software filters use ImageBuffers to generate the result of their applying to the
target element. These buffers can take significant amount of memory if the target
element is large or the number of effects are big.

CoreGraphics provides a better way to apply FilterEffects. A CGStyle can be used
to apply the FilterEffect to the current drawing. Also beginTransparencyLayer()/ endTransparencyLayer() can be used to force applying the FilterEffect only when
composting the layer to the destination GraphicsContext. This will treat the
drawing commands between beginning and ending the transparency layer as a unit
of drawing.

Although ColorMatrix and GussianBlur CGStyles are available on macOS Sonoma and
iOS 17, only DropShadow style will be enabled by this patch. The other styles
will be enabled in future patches after fixing the expected fuzziness.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::supportedFilterRenderingModes const):
* Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::supportedFilterRenderingModes const):

Canonical link: https://commits.webkit.org/268354@main




More information about the webkit-changes mailing list