Backed out 9 changesets (bug 1479173) for build failures in src/dom/animation/EffectCompositor.cpp CLOSED TREE
Backed out changeset 439ac5cfbced (bug 1479173) Backed out changeset 73aba16a223f (bug 1479173) Backed out changeset 89dbc6f7f959 (bug 1479173) Backed out changeset ed1c344ccf0d (bug 1479173) Backed out changeset c330e7e1eb1d (bug 1479173) Backed out changeset efcbbb9daa39 (bug 1479173) Backed out changeset 43c6a7863536 (bug 1479173) Backed out changeset 94f0ae94a02c (bug 1479173) Backed out changeset 7cf0ad1af067 (bug 1479173)
This commit is contained in:
@@ -1242,33 +1242,29 @@ KeyframeEffect::CanThrottle() const
|
||||
return true;
|
||||
}
|
||||
|
||||
EffectSet* effectSet = nullptr;
|
||||
for (const AnimationProperty& property : mProperties) {
|
||||
if (!property.mIsRunningOnCompositor) {
|
||||
return false;
|
||||
// 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 LayerAnimationInfo::Record& record :
|
||||
LayerAnimationInfo::sRecords) {
|
||||
// Skip properties that are overridden by !important rules.
|
||||
// (GetEffectiveAnimationOfProperty, as called by
|
||||
// HasEffectiveAnimationOfProperty, only returns a property which is
|
||||
// neither overridden by !important rules nor overridden by other
|
||||
// animation.)
|
||||
if (!HasEffectiveAnimationOfProperty(record.mProperty)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(nsCSSPropertyIDSet::CompositorAnimatables()
|
||||
.HasProperty(property.mProperty),
|
||||
"The property should be able to run on the compositor");
|
||||
MOZ_ASSERT(HasEffectiveAnimationOfProperty(property.mProperty),
|
||||
"There should be an effective animation of the property while "
|
||||
"it is marked as being run on the compositor");
|
||||
|
||||
if (!effectSet) {
|
||||
effectSet = EffectSet::GetEffectSet(mTarget->mElement,
|
||||
mTarget->mPseudoType);
|
||||
MOZ_ASSERT(effectSet, "CanThrottle should be called on an effect "
|
||||
"associated with a target element");
|
||||
}
|
||||
|
||||
DisplayItemType displayItemType =
|
||||
LayerAnimationInfo::GetDisplayItemTypeForProperty(property.mProperty);
|
||||
|
||||
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(
|
||||
GetPrimaryFrame(), displayItemType);
|
||||
GetPrimaryFrame(), record.mLayerType);
|
||||
// Unthrottle if the animation needs to be brought up to date
|
||||
if (!generation || effectSet->GetAnimationGeneration() != *generation) {
|
||||
return false;
|
||||
@@ -1282,6 +1278,12 @@ KeyframeEffect::CanThrottle() const
|
||||
}
|
||||
}
|
||||
|
||||
for (const AnimationProperty& property : mProperties) {
|
||||
if (!property.mIsRunningOnCompositor) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user