Bug 1077120 - Remove gfxContext::HasError(). r=Bas
authorJonathan Watt <jwatt@jwatt.org>
Sat, 04 Oct 2014 12:13:29 +0100
changeset 208821 b2afb3535ace8584682b5c7965ea14d1e5b80280
parent 208820 1bf8fd2808865142fd65634633083b1072de8930
child 208822 3f971d859cfbc4be117cb47fee9fd69fd9f21dd9
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersBas
bugs1077120
milestone35.0a1
Bug 1077120 - Remove gfxContext::HasError(). r=Bas
gfx/thebes/gfxContext.cpp
gfx/thebes/gfxContext.h
layout/svg/nsSVGOuterSVGFrame.cpp
--- a/gfx/thebes/gfxContext.cpp
+++ b/gfx/thebes/gfxContext.cpp
@@ -1154,23 +1154,16 @@ bool
 gfxContext::PointInStroke(const gfxPoint& pt)
 {
   EnsurePath();
   return mPath->StrokeContainsPoint(CurrentState().strokeOptions,
                                     ToPoint(pt),
                                     Matrix());
 }
 
-bool
-gfxContext::HasError()
-{
-  // As far as this is concerned, an Azure context is never in error.
-  return false;
-}
-
 void
 gfxContext::RoundedRectangle(const gfxRect& rect,
                              const gfxCornerSizes& corners,
                              bool draw_clockwise)
 {
     //
     // For CW drawing, this looks like:
     //
--- a/gfx/thebes/gfxContext.h
+++ b/gfx/thebes/gfxContext.h
@@ -80,21 +80,16 @@ public:
      * Return the raw cairo_t object.
      * XXX this should go away at some point.
      */
     cairo_t *GetCairo();
 
     mozilla::gfx::DrawTarget *GetDrawTarget() { return mDT; }
 
     /**
-     * Returns true if the cairo context is in an error state.
-     */
-    bool HasError();
-
-    /**
      ** State
      **/
     // XXX document exactly what bits are saved
     void Save();
     void Restore();
 
     /**
      ** Paths & Drawing
--- a/layout/svg/nsSVGOuterSVGFrame.cpp
+++ b/layout/svg/nsSVGOuterSVGFrame.cpp
@@ -614,18 +614,16 @@ nsDisplayOuterSVG::Paint(nsDisplayListBu
   aContext->ThebesContext()->Save();
   // We include the offset of our frame and a scale from device pixels to user
   // units (i.e. CSS px) in the matrix that we pass to our children):
   gfxMatrix tm = nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(mFrame) *
                    gfxMatrix::Translation(devPixelOffset);
   nsSVGUtils::PaintFrameWithEffects(mFrame, aContext, tm, &contentAreaDirtyRect);
   aContext->ThebesContext()->Restore();
 
-  NS_ASSERTION(!aContext->ThebesContext()->HasError(), "Cairo in error state");
-
 #if defined(DEBUG) && defined(SVG_DEBUG_PAINT_TIMING)
   PRTime end = PR_Now();
   printf("SVG Paint Timing: %f ms\n", (end-start)/1000.0);
 #endif
 }
 
 static PLDHashOperator CheckForeignObjectInvalidatedArea(nsPtrHashKey<nsSVGForeignObjectFrame>* aEntry, void* aData)
 {