Simplify GrDefaultPathRenderer a tiny bit

This is far less compelling than https://codereview.chromium.org/2135053002/ (Simplify MSAA path renderer) but is probably still worth it.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2135853003

Review-Url: https://codereview.chromium.org/2135853003
This commit is contained in:
robertphillips 2016-07-11 10:44:07 -07:00 committed by Commit bot
parent 8e375309ca
commit c90bc40fdd

View File

@ -442,7 +442,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext,
if (stencilOnly) {
passes[0] = &gDirectToStencil;
} else {
passes[0] = nullptr;
passes[0] = userStencilSettings;
}
lastPassIsBounds = false;
drawFace[0] = GrPipelineBuilder::kBoth_DrawFace;
@ -452,7 +452,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext,
if (stencilOnly) {
passes[0] = &gDirectToStencil;
} else {
passes[0] = nullptr;
passes[0] = userStencilSettings;
}
drawFace[0] = GrPipelineBuilder::kBoth_DrawFace;
lastPassIsBounds = false;
@ -557,11 +557,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext,
SkASSERT(GrPipelineBuilder::kBoth_DrawFace == drawFace[p]);
GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
pipelineBuilder.setDrawFace(drawFace[p]);
if (passes[p]) {
pipelineBuilder.setUserStencil(passes[p]);
} else {
pipelineBuilder.setUserStencil(userStencilSettings);
}
pipelineBuilder.setUserStencil(passes[p]);
drawContext->drawBatch(pipelineBuilder, clip, batch);
} else {
@ -572,11 +568,7 @@ bool GrDefaultPathRenderer::internalDrawPath(GrDrawContext* drawContext,
GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
pipelineBuilder.setDrawFace(drawFace[p]);
if (passes[p]) {
pipelineBuilder.setUserStencil(passes[p]);
} else {
pipelineBuilder.setUserStencil(userStencilSettings);
}
pipelineBuilder.setUserStencil(passes[p]);
if (passCount > 1) {
pipelineBuilder.setDisableColorXPFactory();
}