Bug 1149848 patch 2 - Remove no-longer-needed flags to GetAnimationsForCompositor. r=birtles
authorL. David Baron <dbaron@dbaron.org>
Mon, 06 Apr 2015 18:13:48 -0700
changeset 237822 b3a078738f599aab9eada3a9873bc647717eff0b
parent 237821 c8e78a6795d2d6e7327f9a181b638ee9b0bf6bab
child 237823 1d3a58326caa70fe49374f5c236594a51ca11b44
push id58024
push userdbaron@mozilla.com
push dateTue, 07 Apr 2015 01:14:02 +0000
treeherdermozilla-inbound@b3a078738f59 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1149848, 1109390
milestone40.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 1149848 patch 2 - Remove no-longer-needed flags to GetAnimationsForCompositor. r=birtles This reverts all of bug 1109390 part 20 (except for a whitespace change and a comment removal that patch 1 made irrelevant) and some of part 21.
layout/base/nsDisplayList.cpp
layout/style/AnimationCommon.cpp
layout/style/AnimationCommon.h
layout/style/nsAnimationManager.h
layout/style/nsTransitionManager.h
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -497,21 +497,19 @@ nsDisplayListBuilder::AddAnimationsAndTr
     RestyleManager::GetMaxAnimationGenerationForFrame(aFrame);
   aLayer->SetAnimationGeneration(animationGeneration);
 
   nsIContent* content = aFrame->GetContent();
   if (!content) {
     return;
   }
   AnimationPlayerCollection* transitions =
-    nsTransitionManager::GetAnimationsForCompositor(content, aProperty,
-      GetCompositorAnimationOptions::NotifyActiveLayerTracker);
+    nsTransitionManager::GetAnimationsForCompositor(content, aProperty);
   AnimationPlayerCollection* animations =
-    nsAnimationManager::GetAnimationsForCompositor(content, aProperty,
-      GetCompositorAnimationOptions::NotifyActiveLayerTracker);
+    nsAnimationManager::GetAnimationsForCompositor(content, aProperty);
 
   if (!animations && !transitions) {
     return;
   }
 
   // If the frame is not prerendered, bail out.
   // Do this check only during layer construction; during updating the
   // caller is required to check it appropriately.
--- a/layout/style/AnimationCommon.cpp
+++ b/layout/style/AnimationCommon.cpp
@@ -131,37 +131,32 @@ CommonAnimationManager::NeedsRefresh() c
       return true;
     }
   }
   return false;
 }
 
 AnimationPlayerCollection*
 CommonAnimationManager::GetAnimationsForCompositor(nsIContent* aContent,
-  nsIAtom* aElementProperty,
-  nsCSSProperty aProperty,
-  GetCompositorAnimationOptions aFlags)
+                                                   nsIAtom* aElementProperty,
+                                                   nsCSSProperty aProperty)
 {
   if (!aContent->MayHaveAnimations())
     return nullptr;
 
   AnimationPlayerCollection* collection =
     static_cast<AnimationPlayerCollection*>(
       aContent->GetProperty(aElementProperty));
   if (!collection ||
       !collection->HasAnimationOfProperty(aProperty) ||
       !collection->CanPerformOnCompositorThread(
         AnimationPlayerCollection::CanAnimate_AllowPartial)) {
     return nullptr;
   }
 
-  if (!(aFlags & GetCompositorAnimationOptions::NotifyActiveLayerTracker)) {
-    return collection;
-  }
-
   // This animation can be done on the compositor.
   return collection;
 }
 
 /*
  * nsISupports implementation
  */
 
--- a/layout/style/AnimationCommon.h
+++ b/layout/style/AnimationCommon.h
@@ -30,24 +30,16 @@ class nsIFrame;
 class nsPresContext;
 class nsStyleChangeList;
 
 namespace mozilla {
 
 class RestyleTracker;
 struct AnimationPlayerCollection;
 
-// Options to set when fetching animations to run on the compositor.
-enum class GetCompositorAnimationOptions {
-  // When fetching compositor animations, if there are any such animations,
-  // also let the ActiveLayerTracker know at the same time.
-  NotifyActiveLayerTracker = 1 << 0
-};
-MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(GetCompositorAnimationOptions)
-
 namespace css {
 
 bool IsGeometricProperty(nsCSSProperty aProperty);
 
 class CommonAnimationManager : public nsIStyleRuleProcessor,
                                public nsARefreshObserver {
 public:
   explicit CommonAnimationManager(nsPresContext *aPresContext);
@@ -168,18 +160,17 @@ protected:
 
   virtual bool IsAnimationManager() {
     return false;
   }
 
   static AnimationPlayerCollection*
   GetAnimationsForCompositor(nsIContent* aContent,
                              nsIAtom* aElementProperty,
-                             nsCSSProperty aProperty,
-                             GetCompositorAnimationOptions aFlags);
+                             nsCSSProperty aProperty);
 
   PRCList mElementCollections;
   nsPresContext *mPresContext; // weak (non-null from ctor to Disconnect)
   bool mIsObservingRefreshDriver;
 };
 
 /**
  * A style rule that maps property-StyleAnimationValue pairs.
--- a/layout/style/nsAnimationManager.h
+++ b/layout/style/nsAnimationManager.h
@@ -161,22 +161,20 @@ class nsAnimationManager final
 {
 public:
   explicit nsAnimationManager(nsPresContext *aPresContext)
     : mozilla::css::CommonAnimationManager(aPresContext)
   {
   }
 
   static mozilla::AnimationPlayerCollection*
-  GetAnimationsForCompositor(nsIContent* aContent, nsCSSProperty aProperty,
-                             mozilla::GetCompositorAnimationOptions aFlags
-                               = mozilla::GetCompositorAnimationOptions(0))
+  GetAnimationsForCompositor(nsIContent* aContent, nsCSSProperty aProperty)
   {
     return mozilla::css::CommonAnimationManager::GetAnimationsForCompositor(
-      aContent, nsGkAtoms::animationsProperty, aProperty, aFlags);
+      aContent, nsGkAtoms::animationsProperty, aProperty);
   }
 
   void UpdateStyleAndEvents(mozilla::AnimationPlayerCollection* aEA,
                             mozilla::TimeStamp aRefreshTime,
                             mozilla::EnsureStyleRuleFlags aFlags);
   void QueueEvents(mozilla::AnimationPlayerCollection* aEA,
                    mozilla::EventArray &aEventsToDispatch);
 
--- a/layout/style/nsTransitionManager.h
+++ b/layout/style/nsTransitionManager.h
@@ -99,22 +99,20 @@ public:
     : mozilla::css::CommonAnimationManager(aPresContext)
     , mInAnimationOnlyStyleUpdate(false)
   {
   }
 
   typedef mozilla::AnimationPlayerCollection AnimationPlayerCollection;
 
   static AnimationPlayerCollection*
-  GetAnimationsForCompositor(nsIContent* aContent, nsCSSProperty aProperty,
-                             mozilla::GetCompositorAnimationOptions aFlags
-                               = mozilla::GetCompositorAnimationOptions(0))
+  GetAnimationsForCompositor(nsIContent* aContent, nsCSSProperty aProperty)
   {
     return mozilla::css::CommonAnimationManager::GetAnimationsForCompositor(
-      aContent, nsGkAtoms::transitionsProperty, aProperty, aFlags);
+      aContent, nsGkAtoms::transitionsProperty, aProperty);
   }
 
   /**
    * StyleContextChanged
    *
    * To be called from nsFrameManager::ReResolveStyleContext when the
    * style of an element has changed, to initiate transitions from
    * that style change.  For style contexts with :before and :after