From e8b8d20c83f1f548464eb62caa5093ed30c2d432 Mon Sep 17 00:00:00 2001 From: Kevin Ellis Date: Fri, 19 Jul 2024 10:44:50 -0700 Subject: [PATCH] Apply limit direction when ticking keyframed animation in cc When ticking an animation, we trim to the current iteration. The trim process snaps the iteration time to the boundary of the active interval if outside the interval. This snapping prevents us from applying the correct limit direction when using a step timing function. During the trim process, we now compute the limit direction to apply if needed. We have two sets of animation curves in use: keyframed animation curves, and animation curve adapters. The former apply timing functions while the later do linear interpolation. To keep things simple, we now have 2 curve sampling functions: GetValue and GetTransformedValue. NOTREACHED added to the branch that should not be used for each of the animation curves. Bug: 40870829 Change-Id: I2ede2242fb270464626b84766e17665215dd9c72 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5689318 Reviewed-by: Robert Flack Commit-Queue: Kevin Ellis Cr-Commit-Position: refs/heads/main@{#1330344} --- ...jump-start-animation-before-phase-ref.html | 20 +++++++++++ .../jump-start-animation-before-phase.html | 36 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 css/css-animations/jump-start-animation-before-phase-ref.html create mode 100644 css/css-animations/jump-start-animation-before-phase.html diff --git a/css/css-animations/jump-start-animation-before-phase-ref.html b/css/css-animations/jump-start-animation-before-phase-ref.html new file mode 100644 index 00000000000000..3e1d363058f137 --- /dev/null +++ b/css/css-animations/jump-start-animation-before-phase-ref.html @@ -0,0 +1,20 @@ + + +Validates rendering of an animated element with jump-start in the before phase + + +
+ + diff --git a/css/css-animations/jump-start-animation-before-phase.html b/css/css-animations/jump-start-animation-before-phase.html new file mode 100644 index 00000000000000..86cca0bcda1a49 --- /dev/null +++ b/css/css-animations/jump-start-animation-before-phase.html @@ -0,0 +1,36 @@ + + +Validates rendering of an animated element with jump-start in the before phase + + + + + +
+ + + +