зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1479173 - Call EffectSet::GetEffectSet in CanThrottle just once. r=birtles
Depends on D10693 Differential Revision: https://phabricator.services.mozilla.com/D10694 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
319493d9fc
Коммит
217607fd0b
|
@ -1248,6 +1248,7 @@ KeyframeEffect::CanThrottle() const
|
|||
}
|
||||
}
|
||||
|
||||
EffectSet* effectSet = nullptr;
|
||||
for (const LayerAnimationInfo::Record& record :
|
||||
LayerAnimationInfo::sRecords) {
|
||||
// Skip properties that are overridden by !important rules.
|
||||
|
@ -1259,10 +1260,12 @@ KeyframeEffect::CanThrottle() const
|
|||
continue;
|
||||
}
|
||||
|
||||
EffectSet* effectSet = EffectSet::GetEffectSet(mTarget->mElement,
|
||||
mTarget->mPseudoType);
|
||||
MOZ_ASSERT(effectSet, "CanThrottle should be called on an effect "
|
||||
"associated with a target element");
|
||||
if (!effectSet) {
|
||||
effectSet = EffectSet::GetEffectSet(mTarget->mElement,
|
||||
mTarget->mPseudoType);
|
||||
MOZ_ASSERT(effectSet, "CanThrottle should be called on an effect "
|
||||
"associated with a target element");
|
||||
}
|
||||
// Note that AnimationInfo::GetGenarationFromFrame() is supposed to work
|
||||
// with the primary frame instead of the style frame.
|
||||
Maybe<uint64_t> generation = layers::AnimationInfo::GetGenerationFromFrame(
|
||||
|
|
Загрузка…
Ссылка в новой задаче