Bug 1302949 - Skip calling CalculateCumulativeChangeHint; r=heycam

There are a few pieces missing before we can do this with Servo. Since this
only enables an optimization for off-screen animations we should skip this
for now so it doesn't block animations from running.

MozReview-Commit-ID: GecHWQZYxpK

--HG--
extra : rebase_source : c0330b104afb4b970569c0cb650315e633b7e796
extra : histedit_source : db91b37d3370c9b766976b42b0701f6e0ec56159
This commit is contained in:
Brian Birtles 2016-09-16 11:35:59 +09:00
Родитель 33c4f00dda
Коммит d70d0c2bd5
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -296,7 +296,10 @@ KeyframeEffectReadOnly::UpdateProperties(nsStyleContext* aStyleContext)
runningOnCompositorProperties.HasProperty(property.mProperty);
}
CalculateCumulativeChangeHint(aStyleContext);
// FIXME (bug 1303235): Do this for Servo too
if (aStyleContext->PresContext()->StyleSet()->IsGecko()) {
CalculateCumulativeChangeHint(aStyleContext);
}
MarkCascadeNeedsUpdate();
@ -1275,6 +1278,13 @@ KeyframeEffectReadOnly::CanIgnoreIfNotVisible() const
return false;
}
// FIXME (bug 1303235): We don't calculate mCumulativeChangeHint for
// the Servo backend yet
nsPresContext* presContext = GetPresContext();
if (!presContext || presContext->StyleSet()->IsServo()) {
return false;
}
// FIXME: For further sophisticated optimization we need to check
// change hint on the segment corresponding to computedTiming.progress.
return NS_IsHintSubset(