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

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

Issue 2092893003: Retract PipelineBuilder some more (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update 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/GrPLSPathRenderer.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
index 02d74fff6e53d49c9e693e806c51e46302ecc033..52c98930b82b3be9df1bcc47c16d5e1b8d4811f8 100644
--- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
@@ -13,7 +13,6 @@
#include "GrDrawPathBatch.h"
#include "GrGpu.h"
#include "GrPath.h"
-#include "GrPipelineBuilder.h"
#include "GrRenderTarget.h"
#include "GrResourceProvider.h"
#include "GrStencilPathBatch.h"
@@ -137,14 +136,9 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
GrRectBatchFactory::CreateNonAAFill(args.fPaint->getColor(), viewM, bounds,
nullptr, &invert));
- {
- GrPipelineBuilder pipelineBuilder(*args.fPaint,
- args.fPaint->isAntiAlias() &&
- !args.fDrawContext->hasMixedSamples());
- pipelineBuilder.setUserStencil(&kInvertedCoverPass);
-
- args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, coverBatch);
- }
+ SkASSERT(args.fDrawContext->mustUseHWAA(*args.fPaint) ==
+ (args.fPaint->isAntiAlias() && !args.fDrawContext->hasMixedSamples()));
+ args.fDrawContext->drawBatch(*args.fPaint, *args.fClip, kInvertedCoverPass, coverBatch);
} else {
static constexpr GrUserStencilSettings kCoverPass(
GrUserStencilSettings::StaticInit<
@@ -159,14 +153,9 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
SkAutoTUnref<GrDrawBatch> batch(
GrDrawPathBatch::Create(viewMatrix, args.fPaint->getColor(), p->getFillType(), p));
- GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fPaint->isAntiAlias());
- pipelineBuilder.setUserStencil(&kCoverPass);
- if (args.fAntiAlias) {
- SkASSERT(args.fDrawContext->isStencilBufferMultisampled());
- pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag);
- }
-
- args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
+ SkASSERT(args.fDrawContext->mustUseHWAA(*args.fPaint) ==
+ (args.fPaint->isAntiAlias() || args.fAntiAlias));
+ args.fDrawContext->drawBatch(*args.fPaint, *args.fClip, kCoverPass, batch);
}
return true;
« no previous file with comments | « src/gpu/batches/GrPLSPathRenderer.cpp ('k') | src/gpu/batches/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698