Bug 1518374 - Drop unused aEffectSet parameter from EffectCompositor::AllowCompositorAnimationsOnFrame; r=hiro
authorBrian Birtles <birtles@gmail.com>
Tue, 08 Jan 2019 06:42:56 +0000
changeset 509912 b1f4b8412f62416c82bf0dba41ca7cb7125910e9
parent 509911 c19867adc2c78839543c18eecd2c6425e736b894
child 509913 5d75876949f3865bfc8f07ed5f9a3607461b1318
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1518374
milestone66.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 1518374 - Drop unused aEffectSet parameter from EffectCompositor::AllowCompositorAnimationsOnFrame; r=hiro Depends on D15900 Differential Revision: https://phabricator.services.mozilla.com/D15901
dom/animation/EffectCompositor.cpp
dom/animation/EffectCompositor.h
layout/base/nsLayoutUtils.cpp
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -58,17 +58,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
     }
   }
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(EffectCompositor, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(EffectCompositor, Release)
 
 /* static */ bool EffectCompositor::AllowCompositorAnimationsOnFrame(
-    const nsIFrame* aFrame, const EffectSet& aEffects,
+    const nsIFrame* aFrame,
     AnimationPerformanceWarning::Type& aWarning /* out */) {
   if (aFrame->RefusedAsyncAnimation()) {
     return false;
   }
 
   if (!nsLayoutUtils::AreAsyncAnimationsEnabled()) {
     if (nsLayoutUtils::IsAnimationLoggingEnabled()) {
       nsCString message;
@@ -129,18 +129,17 @@ bool FindAnimationsForCompositor(
   // animation will not be applied since the !important rule overrides it.
   if (effects->PropertiesWithImportantRules().HasProperty(aProperty) &&
       effects->PropertiesForAnimationsLevel().HasProperty(aProperty)) {
     return false;
   }
 
   AnimationPerformanceWarning::Type warning =
       AnimationPerformanceWarning::Type::None;
-  if (!EffectCompositor::AllowCompositorAnimationsOnFrame(aFrame, *effects,
-                                                          warning)) {
+  if (!EffectCompositor::AllowCompositorAnimationsOnFrame(aFrame, warning)) {
     if (warning != AnimationPerformanceWarning::Type::None) {
       EffectCompositor::SetPerformanceWarning(
           aFrame, aProperty, AnimationPerformanceWarning(warning));
     }
     return false;
   }
 
   // The animation cascade will almost always be up-to-date by this point
--- a/dom/animation/EffectCompositor.h
+++ b/dom/animation/EffectCompositor.h
@@ -202,17 +202,17 @@ class EffectCompositor {
   // Otherwise, returns |aElement|.
   static dom::Element* GetElementToRestyle(dom::Element* aElement,
                                            CSSPseudoElementType aPseudoType);
 
   // Returns true if any type of compositor animations on |aFrame| allow
   // runnning on the compositor.
   // Sets the reason in |aWarning| if the result is false.
   static bool AllowCompositorAnimationsOnFrame(
-      const nsIFrame* aFrame, const EffectSet& aEffects,
+      const nsIFrame* aFrame,
       AnimationPerformanceWarning::Type& aWarning /* out */);
 
  private:
   ~EffectCompositor() = default;
 
   // Get the properties in |aEffectSet| that we are able to animate on the
   // compositor but which are also specified at a higher level in the cascade
   // than the animations level.
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -306,18 +306,17 @@ nsLayoutUtils::GetAnimationPropertiesFor
   nsCSSPropertyIDSet properties;
 
   EffectSet* effects = EffectSet::GetEffectSet(aFrame);
   if (!effects) {
     return properties;
   }
 
   AnimationPerformanceWarning::Type warning;
-  if (!EffectCompositor::AllowCompositorAnimationsOnFrame(aFrame, *effects,
-                                                          warning)) {
+  if (!EffectCompositor::AllowCompositorAnimationsOnFrame(aFrame, warning)) {
     return properties;
   }
 
   for (const KeyframeEffect* effect : *effects) {
     properties |= effect->GetPropertiesForCompositor(*effects, aFrame);
   }
 
   return properties;