Backed out changeset 028c43cd12a5 (bug 1051592) for Windows bustage.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 15 Aug 2014 00:37:46 -0400
changeset 199672 9443cda3374e
parent 199671 842b44860ee2
child 199673 44b0dcb52a8c
push id47704
push userryanvm@gmail.com
push date2014-08-15 04:37 +0000
treeherdermozilla-inbound@9443cda3374e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1051592
milestone34.0a1
backs out028c43cd12a5
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
Backed out changeset 028c43cd12a5 (bug 1051592) for Windows bustage. CLOSED TREE
gfx/2d/DrawTargetCairo.cpp
--- a/gfx/2d/DrawTargetCairo.cpp
+++ b/gfx/2d/DrawTargetCairo.cpp
@@ -63,24 +63,17 @@ public:
   AutoPrepareForDrawing(DrawTargetCairo* dt, cairo_t* ctx, const Path* path)
     : mCtx(ctx)
   {
     dt->PrepareForDrawing(ctx, path);
     cairo_save(mCtx);
     MOZ_ASSERT(cairo_status(mCtx) || dt->GetTransform() == GetTransform());
   }
 
-  ~AutoPrepareForDrawing()
-  {
-    cairo_restore(mCtx);
-    cairo_status_t status = cairo_status(mCtx);
-    if (status) {
-      gfxWarning() << "DrawTargetCairo context in error state: " << cairo_status_to_string(status) << "(" << status << ")";
-    }
-  }
+  ~AutoPrepareForDrawing() { cairo_restore(mCtx); }
 
 private:
 #ifdef DEBUG
   Matrix GetTransform()
   {
     cairo_matrix_t mat;
     cairo_get_matrix(mCtx, &mat);
     return Matrix(mat.xx, mat.yx, mat.xy, mat.yy, mat.x0, mat.y0);
@@ -1292,23 +1285,16 @@ DrawTargetCairo::CreateSimilarDrawTarget
 bool
 DrawTargetCairo::InitAlreadyReferenced(cairo_surface_t* aSurface, const IntSize& aSize, SurfaceFormat* aFormat)
 {
   mContext = cairo_create(aSurface);
   mSurface = aSurface;
   mSize = aSize;
   mFormat = aFormat ? *aFormat : CairoContentToGfxFormat(cairo_surface_get_content(aSurface));
 
-  // Cairo image surface have a bug where they will allocate a mask surface (for clipping)
-  // the size of the clip extents, and don't take the surface extents into account.
-  // Add a manual clip to the surface extents to prevent this.
-  cairo_new_path(mContext);
-  cairo_rectangle(mContext, 0, 0, mSize.width, mSize.height);
-  cairo_clip(mContext);
-
   if (mFormat == SurfaceFormat::B8G8R8A8 ||
       mFormat == SurfaceFormat::R8G8B8A8) {
     SetPermitSubpixelAA(false);
   } else {
     SetPermitSubpixelAA(true);
   }
 
   return true;