[webkit-changes] [WebKit/WebKit] c78d9e: [threaded-animation-resolution] discrete `filter` ...
Antoine Quint
noreply at github.com
Thu Feb 15 12:54:53 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c78d9eaa42973f6f2bb323b620ffc261d7d58a73
https://github.com/WebKit/WebKit/commit/c78d9eaa42973f6f2bb323b620ffc261d7d58a73
Author: Antoine Quint <graouts at webkit.org>
Date: 2024-02-15 (Thu, 15 Feb 2024)
Changed paths:
M Source/WebCore/platform/animation/AcceleratedEffect.cpp
M Source/WebCore/platform/animation/AcceleratedEffect.h
M Source/WebCore/rendering/RenderLayerBacking.cpp
Log Message:
-----------
[threaded-animation-resolution] discrete `filter` interpolation should 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
More information about the webkit-changes
mailing list