-
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] discrete
filter
interpolation shoul…
…d not be accelerated https://bugs.webkit.org/show_bug.cgi?id=269449 Reviewed by Dean Jackson. The CSS `filter` property animates discretely if two `filter` values do not have a shared initial list of filter operations, as specified in https://drafts.fxtf.org/filter-effects/#interpolation-of-filters. It does not make much sense to accelerate discrete animation of any value but, more importantly, the system we use to animate `filter` in the UIProcess relies on `CAPresentationModifier` on macOS and requires a known list of filter operations for initial setup, which falls apart if we are dealing with mis-matching filter lists. As such we must make sure we don't create `AcceleratedEffect` objects that contain `filter` values that will animate discretely. We change `AcceleratedEffect::create()` to return a `RefPtr` rather than a `Ref` and only return a value after running the new validation function `validateFilters()` which will find all keyframe intervals, including those relying on implicit 0% and 100% keyframes, and check there is no set of filters that will yield a discrete animation. If we find such a pair of filters, we remove the property from the list of animated properties for those keyframes and the effect itself and, should we not have a single animated property left, return a `nullptr` value. * Source/WebCore/platform/animation/AcceleratedEffect.cpp: (WebCore::AcceleratedEffect::Keyframe::clearProperty): (WebCore::AcceleratedEffect::create): (WebCore::AcceleratedEffect::validateFilters): * Source/WebCore/platform/animation/AcceleratedEffect.h: * Source/WebCore/rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateAcceleratedEffectsAndBaseValues): Canonical link: https://commits.webkit.org/274755@main
- Loading branch information
Showing
3 changed files
with
108 additions
and
10 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