Bug 1676791 - Part 7: Disable OMTA for scroll-timeline. r=hiro
For simplicity purposes, we don't consider OMTA for now. OMTA support for scoll-timeline will be done in Bug 1737180. However, in this patch, we would like to address: if the geometic animations use scroll-timeline, we don't have to let it affect the transform animations on the same animation target: 1. If we don't do scrolling, its geometric properties don't change, so no effect on transform-like properties. 2. If we do scrolling, we may un-throttle the transform animations by other ways, e.g. Keyframe::CanThrottle(). So we don't need to worry about this. Note: tests are in the next patch. Differential Revision: https://phabricator.services.mozilla.com/D129103
This commit is contained in:
@@ -1687,9 +1687,13 @@ bool KeyframeEffect::ShouldBlockAsyncTransformAnimations(
|
||||
return true;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mAnimation);
|
||||
// Note: If the geometric animations are using scroll-timeline, we don't need
|
||||
// to synchronize transform animations with them.
|
||||
const bool enableMainthreadSynchronizationWithGeometricAnimations =
|
||||
StaticPrefs::
|
||||
dom_animations_mainthread_synchronization_with_geometric_animations();
|
||||
dom_animations_mainthread_synchronization_with_geometric_animations() &&
|
||||
!mAnimation->UsingScrollTimeline();
|
||||
|
||||
for (const AnimationProperty& property : mProperties) {
|
||||
// If there is a property for animations level that is overridden by
|
||||
@@ -2025,6 +2029,13 @@ KeyframeEffect::MatchForCompositor KeyframeEffect::IsMatchForCompositor(
|
||||
return KeyframeEffect::MatchForCompositor::NoAndBlockThisProperty;
|
||||
}
|
||||
|
||||
// Unconditionally disable OMTA for scroll-timeline.
|
||||
// FIXME: Bug 1737180: Once we support OMTA for scroll-timeline, we can just
|
||||
// drop this.
|
||||
if (mAnimation->UsingScrollTimeline()) {
|
||||
return KeyframeEffect::MatchForCompositor::No;
|
||||
}
|
||||
|
||||
if (!HasEffectiveAnimationOfPropertySet(aPropertySet, aEffects)) {
|
||||
return KeyframeEffect::MatchForCompositor::No;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user