Bug 1368551 - Remove unneccessary overload of PushStackingContext. r=pchang
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 01 Jun 2017 09:17:16 -0400
changeset 361813 85e598624e0ffb8ed7532e2f1495dcf3e591e918
parent 361812 082c1ba38bd310fcabe90a31155298899120b7c2
child 361814 67f689dd202dca5fe70622a131b087408f7119f2
push id31944
push userryanvm@gmail.com
push dateThu, 01 Jun 2017 16:44:22 +0000
treeherdermozilla-central@0e9853e31da9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspchang
bugs1368551
milestone55.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 1368551 - Remove unneccessary overload of PushStackingContext. r=pchang This overload is only called in one place, so we can just inline it. It makes the API a little simpler. MozReview-Commit-ID: H55IUduUSiJ
gfx/layers/wr/StackingContextHelper.cpp
gfx/webrender_bindings/WebRenderAPI.cpp
gfx/webrender_bindings/WebRenderAPI.h
--- a/gfx/layers/wr/StackingContextHelper.cpp
+++ b/gfx/layers/wr/StackingContextHelper.cpp
@@ -21,19 +21,18 @@ StackingContextHelper::StackingContextHe
                                              wr::DisplayListBuilder& aBuilder,
                                              WebRenderLayer* aLayer,
                                              const Maybe<gfx::Matrix4x4>& aTransform)
   : mBuilder(&aBuilder)
 {
   WrRect scBounds = aParentSC.ToRelativeWrRect(aLayer->BoundsForStackingContext());
   Layer* layer = aLayer->GetLayer();
   mTransform = aTransform.valueOr(layer->GetTransform());
-  mBuilder->PushStackingContext(scBounds,
-                                1.0f,
-                                mTransform,
+  float opacity = 1.0f;
+  mBuilder->PushStackingContext(scBounds, 0, &opacity, &mTransform,
                                 wr::ToWrMixBlendMode(layer->GetMixBlendMode()));
   mOrigin = aLayer->Bounds().TopLeft();
 }
 
 StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParentSC,
                                              wr::DisplayListBuilder& aBuilder,
                                              WebRenderLayer* aLayer,
                                              uint64_t aAnimationsId,
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -565,26 +565,16 @@ DisplayListBuilder::PushStackingContext(
   const WrMatrix* maybeTransform = aTransform ? &matrix : nullptr;
   WRDL_LOG("PushStackingContext b=%s t=%s\n", Stringify(aBounds).c_str(),
       aTransform ? Stringify(*aTransform).c_str() : "none");
   wr_dp_push_stacking_context(mWrState, aBounds, aAnimationId, aOpacity,
                               maybeTransform, aMixBlendMode);
 }
 
 void
-DisplayListBuilder::PushStackingContext(const WrRect& aBounds,
-                                        const float aOpacity,
-                                        const gfx::Matrix4x4& aTransform,
-                                        const WrMixBlendMode& aMixBlendMode)
-{
-  PushStackingContext(aBounds, 0, &aOpacity,
-                      &aTransform, aMixBlendMode);
-}
-
-void
 DisplayListBuilder::PopStackingContext()
 {
   WRDL_LOG("PopStackingContext\n");
   wr_dp_pop_stacking_context(mWrState);
 }
 
 void
 DisplayListBuilder::PushClip(const WrRect& aClipRect,
--- a/gfx/webrender_bindings/WebRenderAPI.h
+++ b/gfx/webrender_bindings/WebRenderAPI.h
@@ -140,21 +140,16 @@ public:
 
   void Begin(const LayerIntSize& aSize);
 
   void End();
   void Finalize(WrSize& aOutContentSize,
                 wr::BuiltDisplayList& aOutDisplayList);
 
   void PushStackingContext(const WrRect& aBounds, // TODO: We should work with strongly typed rects
-                           const float aOpacity,
-                           const gfx::Matrix4x4& aTransform,
-                           const WrMixBlendMode& aMixBlendMode);
-
-  void PushStackingContext(const WrRect& aBounds, // TODO: We should work with strongly typed rects
                            const uint64_t& aAnimationId,
                            const float* aOpacity,
                            const gfx::Matrix4x4* aTransform,
                            const WrMixBlendMode& aMixBlendMode);
   void PopStackingContext();
 
   void PushClip(const WrRect& aClipRect,
                 const WrImageMask* aMask);