New issue
Advanced search Search tips

Issue 811941 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

AnimationHost event sync logic should depend on Animation::id_

Project Member Reported by majidvp@chromium.org, Feb 13 2018

Issue description

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


 
Labels: -Type-Bug Type-Task
This feels like a task, not a bug. Please change back if I am wrong.

Sign in to add a comment