diff --git a/layout/svg/base/src/nsSVGGeometryFrame.cpp b/layout/svg/base/src/nsSVGGeometryFrame.cpp index 48426b36566..7ba3e0f866b 100644 --- a/layout/svg/base/src/nsSVGGeometryFrame.cpp +++ b/layout/svg/base/src/nsSVGGeometryFrame.cpp @@ -332,8 +332,7 @@ nsSVGGeometryFrame::MaybeOptimizeOpacity(float aOpacity) } PRBool -nsSVGGeometryFrame::SetupCairoFill(gfxContext *aContext, - void **aClosure) +nsSVGGeometryFrame::SetupCairoFill(gfxContext *aContext) { if (GetStyleSVG()->mFillRule == NS_STYLE_FILL_RULE_EVENODD) aContext->SetFillRule(gfxContext::FILL_RULE_EVEN_ODD); @@ -345,7 +344,7 @@ nsSVGGeometryFrame::SetupCairoFill(gfxContext *aContext, if (GetStateBits() & NS_STATE_SVG_FILL_PSERVER) { nsSVGPaintServerFrame *ps = static_cast (GetProperty(nsGkAtoms::fill)); - return ps->SetupPaintServer(aContext, this, opacity, aClosure); + return ps->SetupPaintServer(aContext, this, opacity); } else if (GetStyleSVG()->mFill.mType == eStyleSVGPaintType_Server) { SetupCairoColor(aContext, GetStyleSVG()->mFill.mFallbackColor, @@ -405,8 +404,7 @@ nsSVGGeometryFrame::SetupCairoStrokeHitGeometry(gfxContext *aContext) } PRBool -nsSVGGeometryFrame::SetupCairoStroke(gfxContext *aContext, - void **aClosure) +nsSVGGeometryFrame::SetupCairoStroke(gfxContext *aContext) { SetupCairoStrokeHitGeometry(aContext); @@ -415,7 +413,7 @@ nsSVGGeometryFrame::SetupCairoStroke(gfxContext *aContext, if (GetStateBits() & NS_STATE_SVG_STROKE_PSERVER) { nsSVGPaintServerFrame *ps = static_cast (GetProperty(nsGkAtoms::stroke)); - return ps->SetupPaintServer(aContext, this, opacity, aClosure); + return ps->SetupPaintServer(aContext, this, opacity); } else if (GetStyleSVG()->mStroke.mType == eStyleSVGPaintType_Server) { SetupCairoColor(aContext, GetStyleSVG()->mStroke.mFallbackColor, diff --git a/layout/svg/base/src/nsSVGGeometryFrame.h b/layout/svg/base/src/nsSVGGeometryFrame.h index 23a5eb6bec5..e52819431a5 100644 --- a/layout/svg/base/src/nsSVGGeometryFrame.h +++ b/layout/svg/base/src/nsSVGGeometryFrame.h @@ -98,7 +98,7 @@ public: * Set up a cairo context for filling a path * @return PR_FALSE to skip rendering */ - PRBool SetupCairoFill(gfxContext *aContext, void **aClosure); + PRBool SetupCairoFill(gfxContext *aContext); // Set up a cairo context for measuring a stroked path void SetupCairoStrokeGeometry(gfxContext *aContext); @@ -110,7 +110,7 @@ public: * Set up a cairo context for stroking a path * @return PR_FALSE to skip rendering */ - PRBool SetupCairoStroke(gfxContext *aContext, void **aClosure); + PRBool SetupCairoStroke(gfxContext *aContext); protected: virtual nsresult UpdateGraphic(PRBool suppressInvalidation = PR_FALSE) = 0; diff --git a/layout/svg/base/src/nsSVGGlyphFrame.cpp b/layout/svg/base/src/nsSVGGlyphFrame.cpp index 3e9d1cd1e0b..77c3cc81396 100644 --- a/layout/svg/base/src/nsSVGGlyphFrame.cpp +++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp @@ -299,12 +299,11 @@ nsSVGGlyphFrame::PaintSVG(nsSVGRenderState *aContext, nsRect *aDirtyRect) return NS_OK; } - void *closure; - if (HasFill() && SetupCairoFill(gfx, &closure)) { + if (HasFill() && SetupCairoFill(gfx)) { LoopCharacters(gfx, text, cp, FILL); } - if (HasStroke() && SetupCairoStroke(gfx, &closure)) { + if (HasStroke() && SetupCairoStroke(gfx)) { gfx->NewPath(); LoopCharacters(gfx, text, cp, STROKE); gfx->Stroke(); diff --git a/layout/svg/base/src/nsSVGGradientFrame.cpp b/layout/svg/base/src/nsSVGGradientFrame.cpp index ab558154e91..0a385220cda 100644 --- a/layout/svg/base/src/nsSVGGradientFrame.cpp +++ b/layout/svg/base/src/nsSVGGradientFrame.cpp @@ -324,11 +324,8 @@ nsSVGGradientFrame::GetSpreadMethod() PRBool nsSVGGradientFrame::SetupPaintServer(gfxContext *aContext, nsSVGGeometryFrame *aSource, - float aGraphicOpacity, - void **aClosure) + float aGraphicOpacity) { - *aClosure = nsnull; - PRUint32 nStops = GetStopCount(); // SVG specification says that no stops should be treated like diff --git a/layout/svg/base/src/nsSVGGradientFrame.h b/layout/svg/base/src/nsSVGGradientFrame.h index dd0e58580fd..c721fa86b1d 100644 --- a/layout/svg/base/src/nsSVGGradientFrame.h +++ b/layout/svg/base/src/nsSVGGradientFrame.h @@ -63,8 +63,7 @@ public: // nsSVGPaintServerFrame methods: virtual PRBool SetupPaintServer(gfxContext *aContext, nsSVGGeometryFrame *aSource, - float aGraphicOpacity, - void **aClosure); + float aGraphicOpacity); // nsISupports interface: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); diff --git a/layout/svg/base/src/nsSVGPaintServerFrame.h b/layout/svg/base/src/nsSVGPaintServerFrame.h index e6b72244278..db685b68b1e 100644 --- a/layout/svg/base/src/nsSVGPaintServerFrame.h +++ b/layout/svg/base/src/nsSVGPaintServerFrame.h @@ -59,8 +59,7 @@ public: */ virtual PRBool SetupPaintServer(gfxContext *aContext, nsSVGGeometryFrame *aSource, - float aOpacity, - void **aClosure) = 0; + float aOpacity) = 0; // nsISupports interface: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); diff --git a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp index d651dbd4279..e97f67ca18a 100644 --- a/layout/svg/base/src/nsSVGPathGeometryFrame.cpp +++ b/layout/svg/base/src/nsSVGPathGeometryFrame.cpp @@ -642,12 +642,11 @@ nsSVGPathGeometryFrame::Render(nsSVGRenderState *aContext) break; } - void *closure; - if (HasFill() && SetupCairoFill(gfx, &closure)) { + if (HasFill() && SetupCairoFill(gfx)) { gfx->Fill(); } - if (HasStroke() && SetupCairoStroke(gfx, &closure)) { + if (HasStroke() && SetupCairoStroke(gfx)) { gfx->Stroke(); } diff --git a/layout/svg/base/src/nsSVGPatternFrame.cpp b/layout/svg/base/src/nsSVGPatternFrame.cpp index a4211405d6f..18db92a29b8 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.cpp +++ b/layout/svg/base/src/nsSVGPatternFrame.cpp @@ -831,11 +831,8 @@ nsSVGPatternFrame::GetCallerGeometry(nsIDOMSVGMatrix **aCTM, PRBool nsSVGPatternFrame::SetupPaintServer(gfxContext *aContext, nsSVGGeometryFrame *aSource, - float aGraphicOpacity, - void **aClosure) + float aGraphicOpacity) { - *aClosure = nsnull; - if (aGraphicOpacity == 0.0f) return PR_FALSE; diff --git a/layout/svg/base/src/nsSVGPatternFrame.h b/layout/svg/base/src/nsSVGPatternFrame.h index f22b2d60f9e..6b43456f166 100644 --- a/layout/svg/base/src/nsSVGPatternFrame.h +++ b/layout/svg/base/src/nsSVGPatternFrame.h @@ -73,8 +73,7 @@ public: // nsSVGPaintServerFrame methods: virtual PRBool SetupPaintServer(gfxContext *aContext, nsSVGGeometryFrame *aSource, - float aGraphicOpacity, - void **aClosure); + float aGraphicOpacity); // nsISupports interface: NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);