Bug 1422414. Remove unused StackingContextHelper::mOrigin. r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Fri, 01 Dec 2017 22:20:33 -0500
changeset 394644 da64771ef8457997534d1b612388443ae3894c27
parent 394643 581884fc2da1d5e9e8ea3653deb38d70a68571f5
child 394645 2339bb5284296c1de33f6ae7c683e27f976421fd
push id56411
push userjmuizelaar@mozilla.com
push dateSat, 02 Dec 2017 03:41:05 +0000
treeherderautoland@da64771ef845 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1422414
milestone59.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 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 */