From eb38bf66c12004ab5421d77973d3709ed2cf7e0b Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 3 May 2017 08:48:07 -0400 Subject: [PATCH] Bug 1360246 - Clean up WebRenderRefLayer::RenderLayer. r=nical This cleans up WebRenderRefLayer::RenderLayer to use typed coordinate systems and the StackingContextHelper. Note that this patch contains a functional change, because the clip rect pushed no longer includes the transform on the ref layer itself. It's not clear to me why we were doing that, and didn't seem correct. MozReview-Commit-ID: K7FoeLnXc56 --- gfx/layers/wr/WebRenderContainerLayer.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/gfx/layers/wr/WebRenderContainerLayer.cpp b/gfx/layers/wr/WebRenderContainerLayer.cpp index 3ece089db77e..b5a677f35be0 100644 --- a/gfx/layers/wr/WebRenderContainerLayer.cpp +++ b/gfx/layers/wr/WebRenderContainerLayer.cpp @@ -109,20 +109,11 @@ void WebRenderRefLayer::RenderLayer(wr::DisplayListBuilder& aBuilder, const StackingContextHelper& aSc) { - gfx::Matrix4x4 transform;// = GetTransform(); - gfx::Rect relBounds = TransformedVisibleBoundsRelativeToParent(); + LayerRect rect = Bounds(); + DumpLayerInfo("RefLayer", rect); - WrClipRegion clipRegion = aBuilder.BuildClipRegion(wr::ToWrRect(relBounds)); - - if (gfxPrefs::LayersDump()) { - printf_stderr("RefLayer %p (%" PRIu64 ") using bounds/overflow=%s, transform=%s\n", - this->GetLayer(), - mId, - Stringify(relBounds).c_str(), - Stringify(transform).c_str()); - } - - aBuilder.PushIFrame(wr::ToWrRect(relBounds), clipRegion, wr::AsPipelineId(mId)); + WrClipRegion clipRegion = aBuilder.BuildClipRegion(aSc.ToRelativeWrRect(rect)); + aBuilder.PushIFrame(aSc.ToRelativeWrRect(rect), clipRegion, wr::AsPipelineId(mId)); } } // namespace layers