зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1322291 - Part 3: Ensure base styles if there is an additive or accumulate segment for propertis that can be run on the compositor. r=birtles
MozReview-Commit-ID: JjIQkafUh91
This commit is contained in:
Родитель
004deddec2
Коммит
005409105f
|
@ -430,6 +430,12 @@ KeyframeEffectReadOnly::EnsureBaseStylesForCompositor(
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We only call SetNeedsBaseStyle after calling GetBaseStyle so if
|
||||||
|
// NeedsBaseStyle is true, the base style should be already filled-in.
|
||||||
|
if (NeedsBaseStyle(property.mProperty)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (const AnimationPropertySegment& segment : property.mSegments) {
|
for (const AnimationPropertySegment& segment : property.mSegments) {
|
||||||
if (segment.mFromComposite == dom::CompositeOperation::Replace &&
|
if (segment.mFromComposite == dom::CompositeOperation::Replace &&
|
||||||
segment.mToComposite == dom::CompositeOperation::Replace) {
|
segment.mToComposite == dom::CompositeOperation::Replace) {
|
||||||
|
@ -473,18 +479,15 @@ KeyframeEffectReadOnly::ComposeStyle(
|
||||||
// time so we shouldn't animate.
|
// time so we shouldn't animate.
|
||||||
if (computedTiming.mProgress.IsNull()) {
|
if (computedTiming.mProgress.IsNull()) {
|
||||||
// If we are not in-effect, this effect might still be sent to the
|
// If we are not in-effect, this effect might still be sent to the
|
||||||
// compositor and later become in-effect (e.g. if it is in the delay phase).
|
// compositor and later become in-effect (e.g. if it is in the delay phase,
|
||||||
|
// or, if it is in the end delay phase but with a negative playback rate).
|
||||||
// In that case, we might need the base style in order to perform
|
// In that case, we might need the base style in order to perform
|
||||||
// additive/accumulative animation on the compositor.
|
// additive/accumulative animation on the compositor.
|
||||||
|
|
||||||
// In case of properties that can be run on the compositor, we need the base
|
// Note, however, that we don't actually send animations with a negative
|
||||||
// styles for such properties because those animation will be sent to
|
// playback rate in their end delay phase to the compositor at this stage
|
||||||
// compositor while they are in delay phase so that we can composite this
|
// (bug 1330498).
|
||||||
// animation on the compositor once the animation is out of the delay phase
|
EnsureBaseStylesForCompositor(aPropertiesToSkip);
|
||||||
// on the compositor.
|
|
||||||
if (computedTiming.mPhase == ComputedTiming::AnimationPhase::Before) {
|
|
||||||
EnsureBaseStylesForCompositor(aPropertiesToSkip);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,6 +594,14 @@ KeyframeEffectReadOnly::ComposeStyle(
|
||||||
aStyleRule->AddValue(prop.mProperty, Move(toValue));
|
aStyleRule->AddValue(prop.mProperty, Move(toValue));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For properties that can be run on the compositor, we may need to prepare
|
||||||
|
// base styles to send to the compositor even if the current processing
|
||||||
|
// segment for properties does not have either an additive or accumulative
|
||||||
|
// composite mode, and even if the animation is not in-effect. That's because
|
||||||
|
// the animation may later progress to a segment which has an additive or
|
||||||
|
// accumulative composite on the compositor mode.
|
||||||
|
EnsureBaseStylesForCompositor(aPropertiesToSkip);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
Загрузка…
Ссылка в новой задаче