aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-07-07 07:33:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-07 07:33:13 -0700
commit3950f0d7239c05687ac96c211e49ceab9ab9ff4d (patch)
tree3e2cd5430b2f05f37ceda3b735a5ebb3924c037e /src/gpu
parent82356cc41f360c607a1612cb9aead2423c0846a0 (diff)
Remove fColor from PathRenderer DrawPathArgs struct
This was getting in the way of other refactorings. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2126083002 Review-Url: https://codereview.chromium.org/2126083002
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrClipMaskManager.cpp2
-rw-r--r--src/gpu/GrDrawContext.cpp2
-rw-r--r--src/gpu/GrPathRenderer.h2
-rw-r--r--src/gpu/GrSWMaskHelper.cpp8
-rw-r--r--src/gpu/GrSWMaskHelper.h3
-rw-r--r--src/gpu/GrSoftwarePathRenderer.cpp31
-rw-r--r--src/gpu/GrSoftwarePathRenderer.h6
-rw-r--r--src/gpu/batches/GrAAConvexPathRenderer.cpp3
-rw-r--r--src/gpu/batches/GrAADistanceFieldPathRenderer.cpp3
-rw-r--r--src/gpu/batches/GrAAHairLinePathRenderer.cpp3
-rw-r--r--src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp3
-rw-r--r--src/gpu/batches/GrDashLinePathRenderer.cpp2
-rw-r--r--src/gpu/batches/GrDefaultPathRenderer.cpp9
-rw-r--r--src/gpu/batches/GrDefaultPathRenderer.h1
-rw-r--r--src/gpu/batches/GrMSAAPathRenderer.cpp8
-rw-r--r--src/gpu/batches/GrMSAAPathRenderer.h1
-rw-r--r--src/gpu/batches/GrPLSPathRenderer.cpp3
-rw-r--r--src/gpu/batches/GrStencilAndCoverPathRenderer.cpp6
-rw-r--r--src/gpu/batches/GrTessellatingPathRenderer.cpp3
19 files changed, 45 insertions, 54 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index e5f1330986..b9eaa412a8 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -670,7 +670,6 @@ bool GrClipMaskManager::CreateStencilClipMask(GrContext* context,
args.fUserStencilSettings = &kDrawToStencil;
args.fDrawContext = drawContext;
args.fClip = &clip;
- args.fColor = GrColor_WHITE;
args.fViewMatrix = &viewMatrix;
args.fShape = &shape;
args.fAntiAlias = false;
@@ -710,7 +709,6 @@ bool GrClipMaskManager::CreateStencilClipMask(GrContext* context,
args.fUserStencilSettings = *pass;
args.fDrawContext = drawContext;
args.fClip = &clip;
- args.fColor = GrColor_WHITE;
args.fViewMatrix = &viewMatrix;
args.fShape = &shape;
args.fAntiAlias = false;
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index 5474707191..c42661488d 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -968,7 +968,6 @@ bool GrDrawContextPriv::drawAndStencilPath(const GrFixedClip& clip,
args.fUserStencilSettings = ss;
args.fDrawContext = fDrawContext;
args.fClip = &clip;
- args.fColor = GrColor_WHITE;
args.fViewMatrix = &viewMatrix;
args.fShape = &shape;
args.fAntiAlias = useCoverageAA;
@@ -1042,7 +1041,6 @@ void GrDrawContext::internalDrawPath(const GrClip& clip,
args.fUserStencilSettings = &GrUserStencilSettings::kUnused;
args.fDrawContext = this;
args.fClip = &clip;
- args.fColor = paint.getColor();
args.fViewMatrix = &viewMatrix;
args.fShape = canDrawArgs.fShape;
args.fAntiAlias = useCoverageAA;
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index 96e603f075..73e8e03a32 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -130,7 +130,6 @@ public:
GrDrawContext* fDrawContext;
const GrClip* fClip;
- GrColor fColor;
const SkMatrix* fViewMatrix;
const GrShape* fShape;
bool fAntiAlias;
@@ -281,7 +280,6 @@ private:
drawArgs.fPaint = &paint;
drawArgs.fUserStencilSettings = &kIncrementStencil;
drawArgs.fDrawContext = args.fDrawContext;
- drawArgs.fColor = GrColor_WHITE;
drawArgs.fViewMatrix = args.fViewMatrix;
drawArgs.fShape = args.fShape;
drawArgs.fAntiAlias = false; // In this case the MSAA handles the AA so we want to draw BW
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index 496dadf7ca..0b3bdb2228 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -159,10 +159,9 @@ GrTexture* GrSWMaskHelper::DrawShapeMaskToTexture(GrTextureProvider* texProvider
void GrSWMaskHelper::DrawToTargetWithShapeMask(GrTexture* texture,
GrDrawContext* drawContext,
- const GrPaint* paint,
+ const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
- GrColor color,
const SkMatrix& viewMatrix,
const SkIRect& rect) {
SkMatrix invert;
@@ -182,7 +181,7 @@ void GrSWMaskHelper::DrawToTargetWithShapeMask(GrTexture* texture,
maskMatrix.setIDiv(texture->width(), texture->height());
maskMatrix.preTranslate(SkIntToScalar(-rect.fLeft), SkIntToScalar(-rect.fTop));
- GrPipelineBuilder pipelineBuilder(*paint, drawContext->mustUseHWAA(*paint));
+ GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
pipelineBuilder.setUserStencil(userStencilSettings);
pipelineBuilder.addCoverageFragmentProcessor(
@@ -191,7 +190,8 @@ void GrSWMaskHelper::DrawToTargetWithShapeMask(GrTexture* texture,
GrTextureParams::kNone_FilterMode,
kDevice_GrCoordSet));
- SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, SkMatrix::I(),
+ SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(paint.getColor(),
+ SkMatrix::I(),
dstRect, nullptr, &invert));
drawContext->drawBatch(pipelineBuilder, clip, batch);
}
diff --git a/src/gpu/GrSWMaskHelper.h b/src/gpu/GrSWMaskHelper.h
index b015b15a4b..ab88b8d6b9 100644
--- a/src/gpu/GrSWMaskHelper.h
+++ b/src/gpu/GrSWMaskHelper.h
@@ -86,10 +86,9 @@ public:
// output of DrawPathMaskToTexture.
static void DrawToTargetWithShapeMask(GrTexture* texture,
GrDrawContext*,
- const GrPaint* paint,
+ const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip&,
- GrColor,
const SkMatrix& viewMatrix,
const SkIRect& rect);
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 45a4b78b18..54d4851b1c 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -62,27 +62,26 @@ bool get_shape_and_clip_bounds(int width, int height,
}
void GrSoftwarePathRenderer::DrawNonAARect(GrDrawContext* drawContext,
- const GrPaint* paint,
+ const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
- GrColor color,
const SkMatrix& viewMatrix,
const SkRect& rect,
const SkMatrix& localMatrix) {
- SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(color, viewMatrix, rect,
+ SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(paint.getColor(),
+ viewMatrix, rect,
nullptr, &localMatrix));
- GrPipelineBuilder pipelineBuilder(*paint, drawContext->mustUseHWAA(*paint));
+ GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
pipelineBuilder.setUserStencil(userStencilSettings);
drawContext->drawBatch(pipelineBuilder, clip, batch);
}
void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext,
- const GrPaint* paint,
+ const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
- GrColor color,
const SkMatrix& viewMatrix,
const SkIRect& devClipBounds,
const SkIRect& devPathBounds) {
@@ -95,25 +94,25 @@ void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext,
if (devClipBounds.fTop < devPathBounds.fTop) {
rect.iset(devClipBounds.fLeft, devClipBounds.fTop,
devClipBounds.fRight, devPathBounds.fTop);
- DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
+ DrawNonAARect(drawContext, paint, userStencilSettings, clip,
SkMatrix::I(), rect, invert);
}
if (devClipBounds.fLeft < devPathBounds.fLeft) {
rect.iset(devClipBounds.fLeft, devPathBounds.fTop,
devPathBounds.fLeft, devPathBounds.fBottom);
- DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
+ DrawNonAARect(drawContext, paint, userStencilSettings, clip,
SkMatrix::I(), rect, invert);
}
if (devClipBounds.fRight > devPathBounds.fRight) {
rect.iset(devPathBounds.fRight, devPathBounds.fTop,
devClipBounds.fRight, devPathBounds.fBottom);
- DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
+ DrawNonAARect(drawContext, paint, userStencilSettings, clip,
SkMatrix::I(), rect, invert);
}
if (devClipBounds.fBottom > devPathBounds.fBottom) {
rect.iset(devClipBounds.fLeft, devPathBounds.fBottom,
devClipBounds.fRight, devClipBounds.fBottom);
- DrawNonAARect(drawContext, paint, userStencilSettings, clip, color,
+ DrawNonAARect(drawContext, paint, userStencilSettings, clip,
SkMatrix::I(), rect, invert);
}
}
@@ -138,8 +137,8 @@ bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) {
*args.fClip, *args.fShape,
*args.fViewMatrix, &devShapeBounds, &devClipBounds)) {
if (inverseFilled) {
- DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSettings,
- *args.fClip, args.fColor,
+ DrawAroundInvPath(args.fDrawContext, *args.fPaint, args.fUserStencilSettings,
+ *args.fClip,
*args.fViewMatrix, devClipBounds, devShapeBounds);
}
@@ -153,14 +152,14 @@ bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) {
return false;
}
- GrSWMaskHelper::DrawToTargetWithShapeMask(texture, args.fDrawContext, args.fPaint,
+ GrSWMaskHelper::DrawToTargetWithShapeMask(texture, args.fDrawContext, *args.fPaint,
args.fUserStencilSettings,
- *args.fClip, args.fColor, *args.fViewMatrix,
+ *args.fClip, *args.fViewMatrix,
devShapeBounds);
if (inverseFilled) {
- DrawAroundInvPath(args.fDrawContext, args.fPaint, args.fUserStencilSettings,
- *args.fClip, args.fColor,
+ DrawAroundInvPath(args.fDrawContext, *args.fPaint, args.fUserStencilSettings,
+ *args.fClip,
*args.fViewMatrix, devClipBounds, devShapeBounds);
}
diff --git a/src/gpu/GrSoftwarePathRenderer.h b/src/gpu/GrSoftwarePathRenderer.h
index 30edfeb040..f488cbdceb 100644
--- a/src/gpu/GrSoftwarePathRenderer.h
+++ b/src/gpu/GrSoftwarePathRenderer.h
@@ -21,18 +21,16 @@ public:
GrSoftwarePathRenderer(GrTextureProvider* texProvider) : fTexProvider(texProvider) { }
private:
static void DrawNonAARect(GrDrawContext* drawContext,
- const GrPaint* paint,
+ const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
- GrColor color,
const SkMatrix& viewMatrix,
const SkRect& rect,
const SkMatrix& localMatrix);
static void DrawAroundInvPath(GrDrawContext* drawContext,
- const GrPaint* paint,
+ const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
- GrColor color,
const SkMatrix& viewMatrix,
const SkIRect& devClipBounds,
const SkIRect& devPathBounds);
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index df68b9cc51..2c5b4fef5f 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -999,7 +999,8 @@ bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
SkPath path;
args.fShape->asPath(&path);
- SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fColor, *args.fViewMatrix, path));
+ SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fPaint->getColor(),
+ *args.fViewMatrix, path));
GrPipelineBuilder pipelineBuilder(*args.fPaint);
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
index 725358ebf1..6f42a494a3 100644
--- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
@@ -531,7 +531,8 @@ bool GrAADistanceFieldPathRenderer::onDrawPath(const DrawPathArgs& args) {
}
}
- SkAutoTUnref<GrDrawBatch> batch(new AADistanceFieldPathBatch(args.fColor, *args.fShape,
+ SkAutoTUnref<GrDrawBatch> batch(new AADistanceFieldPathBatch(args.fPaint->getColor(),
+ *args.fShape,
args.fAntiAlias, *args.fViewMatrix,
fAtlas, &fShapeCache, &fShapeList,
args.fGammaCorrect));
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index 1a5e6971e7..206a72899f 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -968,7 +968,8 @@ bool GrAAHairLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
SkPath path;
args.fShape->asPath(&path);
- SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fColor, *args.fViewMatrix, path,
+ SkAutoTUnref<GrDrawBatch> batch(create_hairline_batch(args.fPaint->getColor(),
+ *args.fViewMatrix, path,
args.fShape->style(), devClipBounds));
GrPipelineBuilder pipelineBuilder(*args.fPaint);
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
index c7992373aa..4629619860 100644
--- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
@@ -333,7 +333,8 @@ bool GrAALinearizingConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
SkPaint::Join join = fill ? SkPaint::Join::kMiter_Join : stroke.getJoin();
SkScalar miterLimit = stroke.getMiter();
- SkAutoTUnref<GrDrawBatch> batch(new AAFlatteningConvexPathBatch(args.fColor, *args.fViewMatrix,
+ SkAutoTUnref<GrDrawBatch> batch(new AAFlatteningConvexPathBatch(args.fPaint->getColor(),
+ *args.fViewMatrix,
path, strokeWidth, join,
miterLimit));
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index e7ef2402a9..d040e84695 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -38,7 +38,7 @@ bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
}
SkPoint pts[2];
SkAssertResult(args.fShape->asLine(pts, nullptr));
- SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fColor,
+ SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fPaint->getColor(),
*args.fViewMatrix,
pts,
aaMode,
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index 769faa84b0..a1fbc09e5f 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -420,7 +420,6 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext,
const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
- GrColor color,
const SkMatrix& viewMatrix,
const GrShape& shape,
bool stencilOnly) {
@@ -557,7 +556,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext,
const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? SkMatrix::I() :
viewMatrix;
SkAutoTUnref<GrDrawBatch> batch(
- GrRectBatchFactory::CreateNonAAFill(color, viewM, bounds, nullptr,
+ GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM, bounds, nullptr,
&localMatrix));
GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
@@ -570,7 +569,8 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext,
drawContext->drawBatch(pipelineBuilder, clip, batch);
} else {
- SkAutoTUnref<GrDrawBatch> batch(new DefaultPathBatch(color, path, srcSpaceTol,
+ SkAutoTUnref<GrDrawBatch> batch(new DefaultPathBatch(paint.getColor(), path,
+ srcSpaceTol,
newCoverage, viewMatrix,
isHairline, devBounds));
@@ -605,7 +605,6 @@ bool GrDefaultPathRenderer::onDrawPath(const DrawPathArgs& args) {
*args.fPaint,
args.fUserStencilSettings,
*args.fClip,
- args.fColor,
*args.fViewMatrix,
*args.fShape,
false);
@@ -621,7 +620,7 @@ void GrDefaultPathRenderer::onStencilPath(const StencilPathArgs& args) {
paint.setAntiAlias(args.fIsAA);
this->internalDrawPath(args.fDrawContext, paint, &GrUserStencilSettings::kUnused, *args.fClip,
- GrColor_WHITE, *args.fViewMatrix, *args.fShape, true);
+ *args.fViewMatrix, *args.fShape, true);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/batches/GrDefaultPathRenderer.h b/src/gpu/batches/GrDefaultPathRenderer.h
index 04e101320f..abb5cc687a 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.h
+++ b/src/gpu/batches/GrDefaultPathRenderer.h
@@ -34,7 +34,6 @@ private:
const GrPaint&,
const GrUserStencilSettings*,
const GrClip&,
- GrColor,
const SkMatrix& viewMatrix,
const GrShape&,
bool stencilOnly);
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index cd039ece8d..f0137c6ce9 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -560,7 +560,6 @@ bool GrMSAAPathRenderer::internalDrawPath(GrDrawContext* drawContext,
const GrPaint& paint,
const GrUserStencilSettings* userStencilSettings,
const GrClip& clip,
- GrColor color,
const SkMatrix& viewMatrix,
const GrShape& shape,
bool stencilOnly) {
@@ -656,7 +655,7 @@ bool GrMSAAPathRenderer::internalDrawPath(GrDrawContext* drawContext,
const SkMatrix& viewM = (reverse && viewMatrix.hasPerspective()) ? SkMatrix::I() :
viewMatrix;
SkAutoTUnref<GrDrawBatch> batch(
- GrRectBatchFactory::CreateNonAAFill(color, viewM, bounds, nullptr,
+ GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewM, bounds, nullptr,
&localMatrix));
GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
@@ -669,7 +668,7 @@ bool GrMSAAPathRenderer::internalDrawPath(GrDrawContext* drawContext,
drawContext->drawBatch(pipelineBuilder, clip, batch);
} else {
- SkAutoTUnref<MSAAPathBatch> batch(new MSAAPathBatch(color, path, viewMatrix,
+ SkAutoTUnref<MSAAPathBatch> batch(new MSAAPathBatch(paint.getColor(), path, viewMatrix,
devBounds));
if (!batch->isValid()) {
return false;
@@ -713,7 +712,6 @@ bool GrMSAAPathRenderer::onDrawPath(const DrawPathArgs& args) {
*args.fPaint,
args.fUserStencilSettings,
*args.fClip,
- args.fColor,
*args.fViewMatrix,
*shape,
false);
@@ -730,7 +728,7 @@ void GrMSAAPathRenderer::onStencilPath(const StencilPathArgs& args) {
paint.setAntiAlias(args.fIsAA);
this->internalDrawPath(args.fDrawContext, paint, &GrUserStencilSettings::kUnused, *args.fClip,
- GrColor_WHITE, *args.fViewMatrix, *args.fShape, true);
+ *args.fViewMatrix, *args.fShape, true);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/batches/GrMSAAPathRenderer.h b/src/gpu/batches/GrMSAAPathRenderer.h
index e1cf4a3cf3..9cb48eeb4a 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.h
+++ b/src/gpu/batches/GrMSAAPathRenderer.h
@@ -25,7 +25,6 @@ private:
const GrPaint&,
const GrUserStencilSettings*,
const GrClip&,
- GrColor,
const SkMatrix& viewMatrix,
const GrShape&,
bool stencilOnly);
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index c373979bb5..6ec5a3af98 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -948,7 +948,8 @@ bool GrPLSPathRenderer::onDrawPath(const DrawPathArgs& args) {
SkPath path;
args.fShape->asPath(&path);
- SkAutoTUnref<GrDrawBatch> batch(new PLSPathBatch(args.fColor, path, *args.fViewMatrix));
+ SkAutoTUnref<GrDrawBatch> batch(new PLSPathBatch(args.fPaint->getColor(),
+ path, *args.fViewMatrix));
GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->mustUseHWAA(*args.fPaint));
pipelineBuilder.setUserStencil(args.fUserStencilSettings);
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
index 4139629d14..5f98cfd15c 100644
--- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
@@ -142,8 +142,8 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
const SkMatrix& viewM = viewMatrix.hasPerspective() ? SkMatrix::I() : viewMatrix;
SkAutoTUnref<GrDrawBatch> coverBatch(
- GrRectBatchFactory::CreateNonAAFill(args.fColor, viewM, bounds, nullptr,
- &invert));
+ GrRectBatchFactory::CreateNonAAFill(args.fPaint->getColor(), viewM, bounds,
+ nullptr, &invert));
{
GrPipelineBuilder pipelineBuilder(*args.fPaint,
@@ -165,7 +165,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
);
SkAutoTUnref<GrDrawBatch> batch(
- GrDrawPathBatch::Create(viewMatrix, args.fColor, p->getFillType(), p));
+ GrDrawPathBatch::Create(viewMatrix, args.fPaint->getColor(), p->getFillType(), p));
GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fPaint->isAntiAlias());
pipelineBuilder.setUserStencil(&kCoverPass);
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index b17bf1a4d5..992d7735f2 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -271,7 +271,8 @@ bool GrTessellatingPathRenderer::onDrawPath(const DrawPathArgs& args) {
vmi.mapRect(&clipBounds);
SkPath path;
args.fShape->asPath(&path);
- SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, *args.fShape,
+ SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fPaint->getColor(),
+ *args.fShape,
*args.fViewMatrix, clipBounds));
GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->mustUseHWAA(*args.fPaint));