Open Bug 1869475 Opened 1 year ago Updated 9 months ago

[css-properties-values-api] Handle custom properties in grouped animations

Categories

(Core :: CSS Transitions and Animations, enhancement)

enhancement

Tracking

()

People

(Reporter: zrhoffman, Unassigned)

References

(Blocks 2 open bugs)

Details

Once D191059 lands, groupedAnims <https://searchfox.org/mozilla-central/rev/c003be8b9727672e7d30972983b375f4c200233f/gfx/layers/AnimationInfo.cpp#539> and related functions and structs will use AnimatedPropertyID.mID as the hash key, but in order to support custom properties, the entire AnimatedPropertyID should be used.

So basically, this is for compositor animations. We introduce groupAnims because we'd like to compute the transform matrix on the compositor thread.

For more specifically, this is for the transform-like properties:

  1. transform
  2. translate/rotate/scale
  3. offset-*

We do interpolation of these properties on the compositor thread, and then compute a final transform matrix.

If any of these properties have animations, we have to send them together to the compositor. So if any of them use the value of custom properties which are animating, we have to send all of them to the compositor as well.

Therefore, I expect we may have to re-design this function, including the update of the IPC, for custom properties. (Or maybe not if it is possible to combine the animations of the custom properties together with the transform properties before sending them through IPC.)

For now, it's OK with me to disable compositor animations if any of the transform-like properties are using the value of custom properties, so we can keep using nsCSSPropertyID on the compositor (i.e. the property usage in functions of AnimationInfo.cpp and AnimationHelper.cpp).

You need to log in before you can comment on or make changes to this bug.