-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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@main and `transform` with 274487@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
- Loading branch information
Showing
4 changed files
with
283 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.