This is the current sync logic from impl->main:
- Generate events on impl side
- Send events back to main via a post task
- Process events on main in AnimationHost::SetEvents
- use "propertyId + groupId" to match the impl side event to the correct animation on main
The odd thing here is that we use "propertyId + groupId" to identify the animation [1] even though there is Animation::id_ which is identical on both sides.
I cannot find any good reason why we are not using "Animation::id_" in fact the current logic can be brittle and buggy [2]. It also falls
apart if we ever decide to support multiple compositor animation for same property.
I suggest putting Animation::id_ in events and using that to match.
[1] See AnimationTicker::NotifyAnimationStarted
[2] Perhaps if we remove an animation on main thread and add a new one in for the same property, it is theoretically possible for us to notify the event to the wrong animation. This may in pra
Comment 1 by smcgruer@chromium.org
, Sep 5