Bug 1413680 - DrawTargetRecording should return the real size instead of the dummy drawtarget's size. r=jrmuizel draft
authorEthan Lin <ethlin@mozilla.com>
Thu, 02 Nov 2017 13:50:38 +0800
changeset 691891 b90e3e62f84008d57d7973af75b252613cebe310
parent 691806 0a50066b2de805de843762b9787b2b3d2d5bf93f
child 738623 af59a9a32508cb0bcde33a06893ecc5b06233ebc
push id87353
push userbmo:ethlin@mozilla.com
push dateThu, 02 Nov 2017 07:22:52 +0000
reviewersjrmuizel
bugs1413680
milestone58.0a1
Bug 1413680 - DrawTargetRecording should return the real size instead of the dummy drawtarget's size. r=jrmuizel MozReview-Commit-ID: E63f8ZIGYm2
gfx/2d/DrawTargetRecording.h
--- a/gfx/2d/DrawTargetRecording.h
+++ b/gfx/2d/DrawTargetRecording.h
@@ -25,17 +25,17 @@ public:
   virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
   virtual bool IsRecording() const override { return true; }
 
   virtual already_AddRefed<SourceSurface> Snapshot() override;
   virtual already_AddRefed<SourceSurface> IntoLuminanceSource(LuminanceType aLuminanceType, float aOpacity) override;
 
   virtual void DetachAllSnapshots() override;
 
-  virtual IntSize GetSize() override { return mFinalDT->GetSize(); }
+  virtual IntSize GetSize() override { return mSize; }
 
   /* Ensure that the DrawTarget backend has flushed all drawing operations to
    * this draw target. This must be called before using the backing surface of
    * this draw target outside of GFX 2D code.
    */
   virtual void Flush() override { mFinalDT->Flush(); }
 
   /*