Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3ed74b8fd5e6bd0a68c5059236607cf4d12ec202
https://github.com/WebKit/WebKit/commit/3ed74b8fd5e6bd0a68c5059236607cf4d12ec202
Author: Antoine Quint <[email protected]>
Date: 2026-01-14 (Wed, 14 Jan 2026)
Changed paths:
A
LayoutTests/webanimations/threaded-animations/threaded-animation-disabled-for-drop-shadow-with-current-color-expected.txt
A
LayoutTests/webanimations/threaded-animations/threaded-animation-disabled-for-drop-shadow-with-current-color.html
A
LayoutTests/webanimations/threaded-animations/threaded-animation-for-drop-shadow-with-color-expected.txt
A
LayoutTests/webanimations/threaded-animations/threaded-animation-for-drop-shadow-with-color.html
M Source/WebCore/platform/animation/AcceleratedEffect.cpp
M Source/WebCore/platform/animation/AcceleratedEffectValues.cpp
M Source/WebCore/platform/graphics/filters/FilterOperation.cpp
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebCore/style/values/filter-effects/StyleFilter.cpp
M Source/WebCore/style/values/filter-effects/StyleFilter.h
Log Message:
-----------
[threaded-animations] allow the `filter` property to be accelerated with
`drop-shadow()` operations containing colors
https://bugs.webkit.org/show_bug.cgi?id=305481
rdar://168144301
Reviewed by Sam Weinig.
In 305530@main we made it so that `drop-shadow()` operations in `filter`
properties using a color would not
be accelerated with threaded animations enabled. This was due to
`DropShadowFilterOperationWithStyleColor`
not having encoding support.
However, provided the color provided is not `currentcolor`, we can resolve this
filter operation type to a
`DropShadowFilterOperation` which we know how to encode. In fact, this is
already what `RenderLayerBacking`
does in its `updateFilters()` and `updateBackdropFilters()` methods.
We now extract the code from `RenderLayerBacking` and move it to
`Style::Filter` such that the `toPlatform()`
function takes a `RenderStyle` to convert to a `DropShadowFilterOperation`
instead of a
`DropShadowFilterOperationWithStyleColor`, as well as a flag that indicates
whether `currentcolor` is allowed.
We now make use of this new `toPlatform()` method when constructing
`AcceleratedEffectValues`.
This now means that we should only find
`DropShadowFilterOperationWithStyleColor` filter operations in
`AcceleratedEffectValues` if it uses `currentcolor`, in which case the code
added in 305530@main will
correctly disallow threaded animation support.
Finally, we needed to restore the blending support for
`DropShadowFilterOperation` which had been removed
in 293027@main, but with new checks that it should only be used from within the
UI process.
The two new tests check that we correctly allow threaded animation generation
depending on whether `currentcolor`
is used.
Tests:
webanimations/threaded-animations/threaded-animation-disabled-for-drop-shadow-with-current-color.html
webanimations/threaded-animations/threaded-animation-for-drop-shadow-with-color.html
Canonical link: https://commits.webkit.org/305629@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications