Bug 1556421. Fix DrawTargetOffset::GetRect. r=mstange
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Thu, 06 Jun 2019 14:11:10 +0000
changeset 477643 a40fab0b4398e572b31b86d19ffac1f6cc473db5
parent 477642 3c6929ada62be8fb77ba48cb474e3425f67f1332
child 477644 60ce5565ab9a8cef6347fd680593d81ab5555054
push id36119
push userncsoregi@mozilla.com
push dateThu, 06 Jun 2019 21:52:09 +0000
treeherdermozilla-central@6a81efd823db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1556421
milestone69.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 1556421. Fix DrawTargetOffset::GetRect. r=mstange We want to ensure that we include the underlying DrawTarget's origin. Differential Revision: https://phabricator.services.mozilla.com/D33518
gfx/2d/DrawTargetOffset.h
--- a/gfx/2d/DrawTargetOffset.h
+++ b/gfx/2d/DrawTargetOffset.h
@@ -59,17 +59,17 @@ class DrawTargetOffset : public DrawTarg
     return mDrawTarget->GetBackendType();
   }
   virtual already_AddRefed<SourceSurface> Snapshot() override;
   virtual already_AddRefed<SourceSurface> IntoLuminanceSource(
       LuminanceType aLuminanceType, float aOpacity) override;
   virtual void DetachAllSnapshots() override;
   virtual IntSize GetSize() const override { return mDrawTarget->GetSize(); }
   virtual IntRect GetRect() const override {
-    return IntRect(mOrigin, GetSize());
+    return mDrawTarget->GetRect() + mOrigin;
   }
 
   virtual void Flush() override;
   virtual void DrawSurface(SourceSurface* aSurface, const Rect& aDest,
                            const Rect& aSource,
                            const DrawSurfaceOptions& aSurfOptions,
                            const DrawOptions& aOptions) override;
   virtual void DrawFilter(FilterNode* aNode, const Rect& aSourceRect,