Bug 933019, part 1 - Remove the gfxContext(gfxASurface*) constructor. r=Bas
authorJonathan Watt <jwatt@jwatt.org>
Thu, 10 Jul 2014 10:58:06 +0100
changeset 214162 b7c3d87d9b4d3ac7df63a1377bfa0abb3d9bb0f0
parent 214161 ff798ed89e0de51e6c2499cac78c6a5cca440868
child 214163 1e83d71dcecc04f3d1b0824310ea956c95c96a15
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBas
bugs933019
milestone33.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 933019, part 1 - Remove the gfxContext(gfxASurface*) constructor. r=Bas
gfx/thebes/gfxContext.cpp
gfx/thebes/gfxContext.h
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -75,35 +75,16 @@ private:
     mozilla::AlignedStorage2<mozilla::gfx::ColorPattern> mColorPattern;
     mozilla::AlignedStorage2<mozilla::gfx::SurfacePattern> mSurfacePattern;
   };
 
   gfxContext *mContext;
   Pattern *mPattern;
 };
 
-gfxContext::gfxContext(gfxASurface *surface)
-  : mRefCairo(nullptr)
-  , mSurface(surface)
-{
-  MOZ_COUNT_CTOR(gfxContext);
-
-  mCairo = cairo_create(surface->CairoSurface());
-  mFlags = surface->GetDefaultContextFlags();
-  if (mSurface->GetRotateForLandscape()) {
-    // Rotate page 90 degrees to draw landscape page on portrait paper
-    gfxIntSize size = mSurface->GetSize();
-    Translate(gfxPoint(0, size.width));
-    gfxMatrix matrix(0, -1,
-                      1,  0,
-                      0,  0);
-    Multiply(matrix);
-  }
-}
-
 gfxContext::gfxContext(DrawTarget *aTarget, const Point& aDeviceOffset)
   : mPathIsRect(false)
   , mTransformChanged(false)
   , mCairo(nullptr)
   , mRefCairo(nullptr)
   , mSurface(nullptr)
   , mFlags(0)
   , mDT(aTarget)
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -36,20 +36,16 @@ template <typename T> class FallibleTArr
  *
  * Note that the gfxContext takes coordinates in device pixels,
  * as opposed to app units.
  */
 class gfxContext MOZ_FINAL {
     NS_INLINE_DECL_REFCOUNTING(gfxContext)
 
 public:
-    /**
-     * Initialize this context from a surface.
-     */
-    gfxContext(gfxASurface *surface);
 
     /**
      * Initialize this context from a DrawTarget.
      * Strips any transform from aTarget.
      * aTarget will be flushed in the gfxContext's destructor.
      */
     gfxContext(mozilla::gfx::DrawTarget *aTarget,
                const mozilla::gfx::Point& aDeviceOffset = mozilla::gfx::Point());