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

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

Issue 2135853003: Simplify GrDefaultPathRenderer a tiny bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | no next file » | 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 446483bcd0d41d8588715dcb32ccb144e961369b..dc40b7c611aeea7f37ba90c4fc292b248e5ab28b 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698