[webkit-changes] [WebKit/WebKit] 7591a3: [threaded-animation-resolution] add support for bl...
Antoine Quint
noreply at github.com
Tue Feb 13 15:33:07 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7591a3073e2887f58afca2dc56e6a3878e7e9c32
https://github.com/WebKit/WebKit/commit/7591a3073e2887f58afca2dc56e6a3878e7e9c32
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-02-13 (Tue, 13 Feb 2024)
Changed paths:
M Source/WebCore/platform/graphics/ca/PlatformCAFilters.h
M Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.h
M Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.mm
Log Message:
-----------
[threaded-animation-resolution] add support for blending `filter` values
https://bugs.webkit.org/show_bug.cgi?id=269236
rdar://122842684
Reviewed by Simon Fraser.
We've added support for blending `opacity` with 274102 at main and `transform`
with 274487 at main. The last group of properties to support is those affecting
in the `CALayer.filters` property. This requires a bit more work than the
other properties since:
- the `drop-shadow()` property maps to separate `CALayer` properties,
- we cannot just compute a single `filters` value for all the other CSS
filter functions.
To that end we use a dedicated `CAPresentationModifier` per animated filter
function. An upcoming patch will ensure that only filter lists that support
interpolation (in other words, not discrete) make it up to the UIProcess,
thus guaranteeing a shared list of primitives. The canonical list of filter
functions can thus be obtained by looking at the longest list of operations
in the provided keyframes or the base value in the case where the 0% or 100%
keyframe is not explicitly provided.
That upcoming patch will also ensure that `drop-shadow()` is the last function
used in a filter list since otherwise the order in which the `CALayer.filters`
property and the properties used to reflect the `drop-shadow()` function won't
match.
This patch was co-authored with Matt Woodrow.
* Source/WebCore/platform/graphics/ca/PlatformCAFilters.h:
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::keyValueCountForFilter):
(WebCore::PlatformCAFilters::presentationModifierCount):
(WebCore::passthroughFilter):
(WebCore::PlatformCAFilters::presentationModifiers):
(WebCore::PlatformCAFilters::updatePresentationModifiers):
(WebCore::PlatformCAFilters::setFiltersOnLayer):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.mm:
(WebKit::RemoteAcceleratedEffectStack::setEffects):
(WebKit::RemoteAcceleratedEffectStack::longestFilterList const):
(WebKit::RemoteAcceleratedEffectStack::initEffectsFromMainThread):
(WebKit::RemoteAcceleratedEffectStack::applyEffectsFromScrollingThread const):
(WebKit::RemoteAcceleratedEffectStack::applyEffectsFromMainThread const):
(WebKit::RemoteAcceleratedEffectStack::computeValues const):
(WebKit::RemoteAcceleratedEffectStack::clear):
Canonical link: https://commits.webkit.org/274587@main
More information about the webkit-changes
mailing list