Bug 1422414. Remove unused StackingContextHelper::mOrigin. r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 01 Dec 2017 22:20:33 -0500
changeset 706825 da64771ef8457997534d1b612388443ae3894c27
parent 706824 581884fc2da1d5e9e8ea3653deb38d70a68571f5
child 706826 2339bb5284296c1de33f6ae7c683e27f976421fd
push id91936
push userbmo:emilio@crisal.io
push dateMon, 04 Dec 2017 10:24:39 +0000
reviewersmstange
bugs1422414
milestone59.0a1
Bug 1422414. Remove unused StackingContextHelper::mOrigin. r=mstange Now that ToRelativeLayoutPoint does no math we should be able to eliminate a copy of the glyph buffer. MozReview-Commit-ID: 1o6awTyE95v
gfx/layers/wr/StackingContextHelper.cpp
gfx/layers/wr/StackingContextHelper.h
--- a/gfx/layers/wr/StackingContextHelper.cpp
+++ b/gfx/layers/wr/StackingContextHelper.cpp
@@ -59,15 +59,15 @@ StackingContextHelper::~StackingContextH
   if (mBuilder) {
     mBuilder->PopStackingContext();
   }
 }
 
 wr::LayoutRect
 StackingContextHelper::ToRelativeLayoutRect(const LayoutDeviceRect& aRect) const
 {
-  auto rect = aRect - mOrigin;
+  auto rect = aRect;
   rect.Round();
   return wr::ToLayoutRect(rect);
 }
 
 } // namespace layers
 } // namespace mozilla
--- a/gfx/layers/wr/StackingContextHelper.h
+++ b/gfx/layers/wr/StackingContextHelper.h
@@ -56,28 +56,27 @@ public:
   // cases with WebRender display item generate the layout device space is the
   // same as the layer space. (TODO: try to make this more explicit somehow).
   // We also round the rectangle to ints after transforming since the output
   // is the final destination rect.
   wr::LayoutRect ToRelativeLayoutRect(const LayoutDeviceRect& aRect) const;
   // Same but for points
   wr::LayoutPoint ToRelativeLayoutPoint(const LayoutDevicePoint& aPoint) const
   {
-    return wr::ToLayoutPoint(aPoint - mOrigin);
+    return wr::ToLayoutPoint(aPoint);
   }
 
 
   // Export the inherited scale
   gfx::Size GetInheritedScale() const { return mScale; }
 
   bool IsBackfaceVisible() const { return mTransform.IsBackfaceVisible(); }
 
 private:
   wr::DisplayListBuilder* mBuilder;
-  LayoutDevicePoint mOrigin;
   gfx::Matrix4x4 mTransform;
   gfx::Size mScale;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif /* GFX_STACKINGCONTEXTHELPER_H */