Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is; 1) Store the partial pre-rendered animation id and the Animation object in a hashtable in LayerManager 2) Store the animation id in the Animation object as well 3) When we detect jank, we send the animation id to the main-thread via an IPC call 4) Find the Animation object with the id in the hashtable and update the Animaiton 5) Whenever the partial pre-rendered Animation stop running on the compositor i.e. the Animation finished normally, the Animation's target element is changed, etc. etc., remove the Animation from the hashtable Depends on D75731 Differential Revision: https://phabricator.services.mozilla.com/D75732
This commit is contained in:
@@ -183,6 +183,11 @@ void Animation::SetEffectNoUpdate(AnimationEffect* aEffect) {
|
||||
// Break links with the old effect and then drop it.
|
||||
RefPtr<AnimationEffect> oldEffect = mEffect;
|
||||
mEffect = nullptr;
|
||||
if (IsPartialPrerendered()) {
|
||||
if (KeyframeEffect* oldKeyframeEffect = oldEffect->AsKeyframeEffect()) {
|
||||
oldKeyframeEffect->ResetPartialPrerendered();
|
||||
}
|
||||
}
|
||||
oldEffect->SetAnimation(nullptr);
|
||||
|
||||
// The following will not do any notification because mEffect is null.
|
||||
|
||||
Reference in New Issue
Block a user