Bug 1068613 - Part 4: Log failures in CairoCreateSimilar. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Wed, 17 Sep 2014 23:23:09 +0200
changeset 730 7edd3381979d
parent 729 1ee0fe73b67c
child 731 38f6c062f179
push id274
push userbschouten@mozilla.com
push dateTue, 23 Sep 2014 16:10:56 +0000
reviewersjrmuizel
bugs1068613
Bug 1068613 - Part 4: Log failures in CairoCreateSimilar. r=jrmuizel
DrawTargetCairo.cpp
--- a/DrawTargetCairo.cpp
+++ b/DrawTargetCairo.cpp
@@ -1375,16 +1375,18 @@ DrawTargetCairo::CreateSimilarDrawTarget
                                                           aSize.width, aSize.height);
 
   if (!cairo_surface_status(similar)) {
     RefPtr<DrawTargetCairo> target = new DrawTargetCairo();
     target->InitAlreadyReferenced(similar, aSize);
     return target.forget();
   }
 
+  gfxCriticalError() << "Failed to create similar cairo surface! Size: " << aSize << " Status: " << cairo_surface_status(similar);
+
   return nullptr;
 }
 
 bool
 DrawTargetCairo::InitAlreadyReferenced(cairo_surface_t* aSurface, const IntSize& aSize, SurfaceFormat* aFormat)
 {
   mContext = cairo_create(aSurface);
   mSurface = aSurface;