Closed Bug 1766041 Opened 2 years ago Closed 2 years ago

Unify Gecko & Servo's Timing Function Computation

Categories

(Core :: CSS Transitions and Animations, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: dshin, Assigned: dshin)

References

Details

Attachments

(5 files, 2 obsolete files)

Computation of animation easing-related timing functions are duplicated on C++ and Rust side.

Unifying the two should be possible given the resolution of bug 1496619.

Flags: needinfo?(boris.chiou)
See Also: → 1766460
Assignee: nobody → dshin
Status: NEW → ASSIGNED

This is for linear(...) easing function where the parsed form requires
additional computation before the output value can be calculated. By
caching the derivation of the output function, we avoid doing so
every step of the animation.

Depends on D150567

Attachment #9283401 - Attachment is obsolete: true
Attachment #9283399 - Attachment is obsolete: true
Attachment #9283400 - Attachment description: Bug 1766041: Part 5: Port bezier edge cases handling from C++ to Rust. r=#layout-reviewers → Bug 1766041: Part 4: Port bezier edge cases handling from C++ to Rust. r=#layout-reviewers

This was made economical by having Rust's computed easing::TimingFunction use
a fully resolved function for linear(...) easing, as per draft resolution from
https://github.com/w3c/csswg-drafts/issues/7415

Depends on D150569

Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/315578c436ca
Part 1: Move Rust animation to `ComputedTimingFunction`. r=boris
https://hg.mozilla.org/integration/autoland/rev/ce5a895e7a06
Part 2: Update rust's step function basd on C++ `ComputedTimingFunction`. r=boris
https://hg.mozilla.org/integration/autoland/rev/cc7ffb683e8a
Part 3: Migrate C++ `BeforeFlag` to that of Rust's. r=boris
https://hg.mozilla.org/integration/autoland/rev/5de0ed4fd59b
Part 4: Port bezier edge cases handling from C++ to Rust. r=emilio
https://hg.mozilla.org/integration/autoland/rev/3b0cd4ee7d1e
Part 5: C++ `ComputedTimingFunction` uses Rust's timing function calculation. r=emilio

Backed out for gtest failures on APZCBasicTester.

Push with failures

Failure log

Backout link

[task 2022-07-07T23:29:12.967Z] 23:29:12     INFO -  TEST-START | APZCBasicTester.ZoomAndScrollableRectChangeAfterZoomChange
[task 2022-07-07T23:29:12.968Z] 23:29:12  WARNING -  TEST-UNEXPECTED-FAIL | APZCBasicTester.ZoomAndScrollableRectChangeAfterZoomChange | Expected equality of these values:
[task 2022-07-07T23:29:12.968Z] 23:29:12     INFO -    newOffset
[task 2022-07-07T23:29:12.968Z] 23:29:12     INFO -      Which is: 214.63
[task 2022-07-07T23:29:12.968Z] 23:29:12     INFO -    offset
[task 2022-07-07T23:29:12.968Z] 23:29:12     INFO -      Which is: 214.63 @ /builds/worker/checkouts/gecko/gfx/layers/apz/test/gtest/TestBasic.cpp:505
[task 2022-07-07T23:29:12.969Z] 23:29:12  WARNING -  TEST-UNEXPECTED-FAIL | APZCBasicTester.ZoomAndScrollableRectChangeAfterZoomChange | test completed (time: 0ms)
[task 2022-07-07T23:29:12.969Z] 23:29:12     INFO -  TEST-START | APZCBasicTester.ZoomToRectAndCompositionBoundsChange
Flags: needinfo?(dshin)

Fix incoming

Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f5153c085ce3
Part 1: Move Rust animation to `ComputedTimingFunction`. r=boris
https://hg.mozilla.org/integration/autoland/rev/d1824a477eec
Part 2: Update rust's step function basd on C++ `ComputedTimingFunction`. r=boris
https://hg.mozilla.org/integration/autoland/rev/fe2e35bcc4d9
Part 3: Migrate C++ `BeforeFlag` to that of Rust's. r=boris
https://hg.mozilla.org/integration/autoland/rev/e42c38a4ae76
Part 4: Port bezier edge cases handling from C++ to Rust. r=emilio
https://hg.mozilla.org/integration/autoland/rev/069ca54ccaa2
Part 5: C++ `ComputedTimingFunction` uses Rust's timing function calculation. r=emilio
Flags: needinfo?(dshin)
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/34786 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(boris.chiou)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: