Bug 1207734 - Part 4.c. Temporary disable async-transform for individual-transform.
Since we do not support async-transform for individual-transform yet.
MozReview-Commit-ID: gfOzHpjOnQ
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -1665,16 +1665,22 @@ KeyframeEffectReadOnly::ShouldBlockAsync
if (property.mProperty == eCSSProperty_transform) {
if (!CanAnimateTransformOnCompositor(aFrame,
aPerformanceWarning)) {
return true;
}
}
}
+ // XXX cku temporarily disable async-animation when this frame has any
+ // individual transforms before bug 1425837 been fixed.
+ if (aFrame->StyleDisplay()->HasIndividualTransform()) {
+ return true;
+ }
+
return false;
}
bool
KeyframeEffectReadOnly::HasGeometricProperties() const
{
for (const AnimationProperty& property : mProperties) {
if (IsGeometricProperty(property.mProperty)) {
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -2798,16 +2798,20 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
* or a related property. */
bool HasTransformStyle() const {
return mSpecifiedTransform || mSpecifiedRotate || mSpecifiedTranslate ||
mSpecifiedScale ||
mTransformStyle == NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D ||
(mWillChangeBitField & NS_STYLE_WILL_CHANGE_TRANSFORM);
}
+ bool HasIndividualTransform() const {
+ return mSpecifiedRotate || mSpecifiedTranslate || mSpecifiedScale;
+ }
+
bool HasPerspectiveStyle() const {
return mChildPerspective.GetUnit() == eStyleUnit_Coord;
}
bool BackfaceIsHidden() const {
return mBackfaceVisibility == NS_STYLE_BACKFACE_VISIBILITY_HIDDEN;
}