From c054f05ef3cd7ed1c894fd747c82557cc39959e5 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 1 Jun 2017 09:17:16 -0400 Subject: [PATCH] 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 | 5 ++--- gfx/webrender_bindings/WebRenderAPI.cpp | 10 ---------- gfx/webrender_bindings/WebRenderAPI.h | 5 ----- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/gfx/layers/wr/StackingContextHelper.cpp b/gfx/layers/wr/StackingContextHelper.cpp index 4ce855038554..fa79bd6063f9 100644 --- a/gfx/layers/wr/StackingContextHelper.cpp +++ b/gfx/layers/wr/StackingContextHelper.cpp @@ -26,9 +26,8 @@ StackingContextHelper::StackingContextHelper(const StackingContextHelper& aParen 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(); } diff --git a/gfx/webrender_bindings/WebRenderAPI.cpp b/gfx/webrender_bindings/WebRenderAPI.cpp index eb5d229bdbf6..3b03c0ec0186 100644 --- a/gfx/webrender_bindings/WebRenderAPI.cpp +++ b/gfx/webrender_bindings/WebRenderAPI.cpp @@ -569,16 +569,6 @@ DisplayListBuilder::PushStackingContext(const WrRect& aBounds, 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() { diff --git a/gfx/webrender_bindings/WebRenderAPI.h b/gfx/webrender_bindings/WebRenderAPI.h index 728401b65bdd..5b8e6d2fac86 100644 --- a/gfx/webrender_bindings/WebRenderAPI.h +++ b/gfx/webrender_bindings/WebRenderAPI.h @@ -144,11 +144,6 @@ public: 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,