зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1479173 - Check mIsRunningOnCompositor flag before iterating LayerAnimationInfo. r=birtles
The comment there was wrong. We just bail out from there only if mIsRunningCompositor is false, so it doesn't matter whatever the layer generation check results. (i.e., we don't bail out in the case where mIsRunningCompositor is true). Also, we iterate over mProperties in the LayerAnimationInfo::sRecords loop through HasEffectiveAnimationOfProperty, so it doesn't matter that we iterate mProperties before the loop either. We will avoid the iteration in the sRecords loop in a subsequent patch in this series. Depends on D10692 Differential Revision: https://phabricator.services.mozilla.com/D10693 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3d741dd722
Коммит
92464c401a
|
@ -1242,10 +1242,12 @@ KeyframeEffect::CanThrottle() const
|
|||
return true;
|
||||
}
|
||||
|
||||
// First we need to check layer generation and transform overflow
|
||||
// prior to the property.mIsRunningOnCompositor check because we should
|
||||
// occasionally unthrottle these animations even if the animations are
|
||||
// already running on compositor.
|
||||
for (const AnimationProperty& property : mProperties) {
|
||||
if (!property.mIsRunningOnCompositor) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (const LayerAnimationInfo::Record& record :
|
||||
LayerAnimationInfo::sRecords) {
|
||||
// Skip properties that are overridden by !important rules.
|
||||
|
@ -1278,12 +1280,6 @@ KeyframeEffect::CanThrottle() const
|
|||
}
|
||||
}
|
||||
|
||||
for (const AnimationProperty& property : mProperties) {
|
||||
if (!property.mIsRunningOnCompositor) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче