зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1228229 part 5 - Separate target element registration in NotifyAnimationTimingUpdated; r=dbaron
KeyframeEffectReadOnly::NotifyAnimationTimingUpdated currently just acts as an alias for UpdateTargetRegistration. However, bug 1226118 added logic to UpdateTargetRegistration which is not strictly related to updating the target element registration. This patch tidies this up so that UpdateTargetRegistration only does what its name suggests. This is in preparation for adding more logic to NotifyAnimationTimingUpdated. --HG-- extra : rebase_source : c6162e8415613d7ec16744228d7cf498b4c19e2c
This commit is contained in:
Родитель
c773cf7551
Коммит
5331e1fa91
|
@ -132,6 +132,23 @@ KeyframeEffectReadOnly::SetTiming(const AnimationTiming& aTiming)
|
||||||
// update our registration with the target element.
|
// update our registration with the target element.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
KeyframeEffectReadOnly::NotifyAnimationTimingUpdated()
|
||||||
|
{
|
||||||
|
UpdateTargetRegistration();
|
||||||
|
|
||||||
|
// If the effect is not relevant it will be removed from the target
|
||||||
|
// element's effect set. However, effects not in the effect set
|
||||||
|
// will not be included in the set of candidate effects for running on
|
||||||
|
// the compositor and hence they won't have their compositor status
|
||||||
|
// updated. As a result, we need to make sure we clear their compositor
|
||||||
|
// status here.
|
||||||
|
bool isRelevant = mAnimation && mAnimation->IsRelevant();
|
||||||
|
if (!isRelevant) {
|
||||||
|
ResetIsRunningOnCompositor();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Nullable<TimeDuration>
|
Nullable<TimeDuration>
|
||||||
KeyframeEffectReadOnly::GetLocalTime() const
|
KeyframeEffectReadOnly::GetLocalTime() const
|
||||||
{
|
{
|
||||||
|
@ -533,10 +550,6 @@ KeyframeEffectReadOnly::UpdateTargetRegistration()
|
||||||
if (effectSet) {
|
if (effectSet) {
|
||||||
effectSet->RemoveEffect(*this);
|
effectSet->RemoveEffect(*this);
|
||||||
}
|
}
|
||||||
// Any effects not in the effect set will not be included in the set of
|
|
||||||
// candidate effects for running on the compositor and hence they won't
|
|
||||||
// have their compositor status updated so we should do that now.
|
|
||||||
ResetIsRunningOnCompositor();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ public:
|
||||||
const AnimationTiming& Timing() const { return mTiming; }
|
const AnimationTiming& Timing() const { return mTiming; }
|
||||||
AnimationTiming& Timing() { return mTiming; }
|
AnimationTiming& Timing() { return mTiming; }
|
||||||
void SetTiming(const AnimationTiming& aTiming);
|
void SetTiming(const AnimationTiming& aTiming);
|
||||||
void NotifyAnimationTimingUpdated() { UpdateTargetRegistration(); }
|
void NotifyAnimationTimingUpdated();
|
||||||
|
|
||||||
Nullable<TimeDuration> GetLocalTime() const;
|
Nullable<TimeDuration> GetLocalTime() const;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче