Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: src/gpu/batches/GrDefaultPathRenderer.cpp

Issue 2126083002: Remove fColor from PathRenderer DrawPathArgs struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unnecessary GrPaint::setColor calls Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/batches/GrDefaultPathRenderer.h ('k') | src/gpu/batches/GrMSAAPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDefaultPathRenderer.cpp
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index 769faa84b0b8a4f4e85c63d4f8d6d264fc1e1d99..a1fbc09e5f53d3429894f61471ce54a18d071df0 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);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/batches/GrDefaultPathRenderer.h ('k') | src/gpu/batches/GrMSAAPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698