Bug 1425837 - Part 5: AnimationInfo::HasTransformAnimation should check other OMTA transform-like properties r=hiro
authorBoris Chiou <boris.chiou@gmail.com>
Mon, 18 Mar 2019 18:04:58 +0000
changeset 464927 067a9dac440ab23f16c8034f104911a80773705a
parent 464926 b27d18cccc623d49dfcd89aa07890ab940d859f5
child 464928 066e7dffe044684ddb7b2c667d7753b8ffab1e93
push id35729
push useropoprus@mozilla.com
push dateTue, 19 Mar 2019 16:30:13 +0000
treeherdermozilla-central@1d783ed68779 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1425837
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1425837 - Part 5: AnimationInfo::HasTransformAnimation should check other OMTA transform-like properties r=hiro This function was added for B2G actually, to check if the layer has OMTA for painting high-res layer. However, It's worth to let it also check other OMTA transform-like properties. Depends on D22565 Differential Revision: https://phabricator.services.mozilla.com/D19636
gfx/layers/AnimationInfo.cpp
--- a/gfx/layers/AnimationInfo.cpp
+++ b/gfx/layers/AnimationInfo.cpp
@@ -124,18 +124,20 @@ bool AnimationInfo::ApplyPendingUpdatesF
     mPendingAnimations = nullptr;
     return true;
   }
 
   return false;
 }
 
 bool AnimationInfo::HasTransformAnimation() const {
+  const nsCSSPropertyIDSet& transformSet =
+      LayerAnimationInfo::GetCSSPropertiesFor(DisplayItemType::TYPE_TRANSFORM);
   for (uint32_t i = 0; i < mAnimations.Length(); i++) {
-    if (mAnimations[i].property() == eCSSProperty_transform) {
+    if (transformSet.HasProperty(mAnimations[i].property())) {
       return true;
     }
   }
   return false;
 }
 
 /* static */
 Maybe<uint64_t> AnimationInfo::GetGenerationFromFrame(