| Summary: | Animations of discrete properties should schedule animation frames sparingly | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Antoine Quint <graouts> |
| Component: | Animations | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | dino, simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Antoine Quint
2020-11-03 13:07:58 PST
This means we'll have to resolve the timing function to predict the amount of time until we reach the mid-way point for the current interval. First step towards this will be refactoring WebAnimation::timeToNextTick() into a KeyframeEffect method. Thinking about this some more, this will require quite a bit of work to handle all cases: 1. we need to identify the keyframe range in which we are in 2. then we need to check whether the interpolation between the values in that range will yield a discrete animation, which cannot always be computed ahead of time since this could be affected by the CSS cascade (as would be the case with `inherit` values). 3. then we need to determine the time until this range reaches its midway point if the current progress is less than 0.5, this will involve resolving the relevant easing However, we could start with dealing with simple cases such as animations that only target discrete properties. But the complete solution definitely requires some non-trivial and potentially expensive work. |