Bug 218532
| 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 | ||
Antoine Quint
As part of bug 218530, we're adding support for a new animation wrapper for CSS properties that support discrete animations only: DiscretePropertyWrapper. We should make it so that we don't schedule invalidation for animations of discrete properties at the full refresh rate but only at times when the property value will change.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/71007801>
Antoine Quint
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.
Antoine Quint
First step towards this will be refactoring WebAnimation::timeToNextTick() into a KeyframeEffect method.
Antoine Quint
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.