Bug 1385861 - Part 3. Rename nsSVGUtils::SetupCairoStrokeGeometry as nsSVGUtils::SetupStrokeGeometry.
(This patch is not relative to performance)
Rename this function since it has not relation with cario at all.
MozReview-Commit-ID: DHvrsVZAJ7B
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -3669,17 +3669,17 @@ SVGTextFrame::PaintSVG(gfxContext& aCont
DrawMode drawMode = contextPaint->Init(&aDrawTarget,
aContext.CurrentMatrix(),
frame, outerContextPaint,
aImgParams);
if (drawMode & DrawMode::GLYPH_STROKE) {
ctxSR.EnsureSaved(&aContext);
// This may change the gfxContext's transform (for non-scaling stroke),
// in which case this needs to happen before we call SetMatrix() below.
- nsSVGUtils::SetupCairoStrokeGeometry(frame, &aContext, outerContextPaint);
+ nsSVGUtils::SetupStrokeGeometry(frame, &aContext, outerContextPaint);
}
// Set up the transform for painting the text frame for the substring
// indicated by the run.
gfxMatrix runTransform =
run.GetTransformFromUserSpaceForPainting(presContext, item) *
currentMatrix;
aContext.SetMatrix(runTransform);
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -1720,19 +1720,19 @@ GetStrokeDashData(nsIFrame* aFrame,
*aDashOffset = SVGContentUtils::CoordToFloat(ctx,
style->mStrokeDashoffset);
}
return (totalLength > 0.0);
}
void
-nsSVGUtils::SetupCairoStrokeGeometry(nsIFrame* aFrame,
- gfxContext *aContext,
- SVGContextPaint* aContextPaint)
+nsSVGUtils::SetupStrokeGeometry(nsIFrame* aFrame,
+ gfxContext *aContext,
+ SVGContextPaint* aContextPaint)
{
float width = GetStrokeWidth(aFrame, aContextPaint);
if (width <= 0)
return;
aContext->SetLineWidth(width);
// Apply any stroke-specific transform
gfxMatrix outerSVGToUser;
--- a/layout/svg/nsSVGUtils.h
+++ b/layout/svg/nsSVGUtils.h
@@ -527,20 +527,19 @@ public:
*/
static bool HasStroke(nsIFrame* aFrame,
SVGContextPaint* aContextPaint = nullptr);
static float GetStrokeWidth(nsIFrame* aFrame,
SVGContextPaint* aContextPaint = nullptr);
/*
- * Set up a cairo context for a stroked path (including any dashing that
- * applies).
+ * Set up a context for a stroked path (including any dashing that applies).
*/
- static void SetupCairoStrokeGeometry(nsIFrame* aFrame, gfxContext *aContext,
+ static void SetupStrokeGeometry(nsIFrame* aFrame, gfxContext *aContext,
SVGContextPaint* aContextPaint = nullptr);
/**
* This function returns a set of bit flags indicating which parts of the
* element (fill, stroke, bounds) should intercept pointer events. It takes
* into account the type of element and the value of the 'pointer-events'
* property on the element.
*/