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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 2147443004: Retract PipelineBuilder from GrClip::apply (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Appease some compilers 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/GrDrawTarget.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 252726c710f565b2d2ec81203a4ae895f7ab6168..601b1b552ad4a0566ba22ede8af5cde384640ec8 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -329,7 +329,9 @@ void GrDrawTarget::drawBatch(const GrPipelineBuilder& pipelineBuilder,
GrAppliedClip appliedClip;
SkRect bounds;
batch_bounds(&bounds, batch);
- if (!clip.apply(fContext, pipelineBuilder, drawContext, &bounds, &appliedClip)) {
+ if (!clip.apply(fContext, drawContext, &bounds,
+ pipelineBuilder.isHWAntialias(), pipelineBuilder.hasUserStencilSettings(),
+ &appliedClip)) {
return;
}
@@ -403,19 +405,19 @@ void GrDrawTarget::drawBatch(const GrPipelineBuilder& pipelineBuilder,
this->recordBatch(batch, clippedBounds);
}
-void GrDrawTarget::stencilPath(const GrPipelineBuilder& pipelineBuilder,
- GrDrawContext* drawContext,
+void GrDrawTarget::stencilPath(GrDrawContext* drawContext,
const GrClip& clip,
+ const GrUserStencilSettings* ss,
+ bool useHWAA,
const SkMatrix& viewMatrix,
- const GrPath* path,
- GrPathRendering::FillType fill) {
+ const GrPath* path) {
// TODO: extract portions of checkDraw that are relevant to path stenciling.
SkASSERT(path);
SkASSERT(this->caps()->shaderCaps()->pathRenderingSupport());
// Setup clip
GrAppliedClip appliedClip;
- if (!clip.apply(fContext, pipelineBuilder, drawContext, nullptr, &appliedClip)) {
+ if (!clip.apply(fContext, drawContext, nullptr, useHWAA, SkToBool(ss), &appliedClip)) {
return;
}
// TODO: respect fClipBatchToBounds if we ever start computing bounds here.
@@ -432,8 +434,8 @@ void GrDrawTarget::stencilPath(const GrPipelineBuilder& pipelineBuilder,
}
GrBatch* batch = GrStencilPathBatch::Create(viewMatrix,
- pipelineBuilder.isHWAntialias(),
- fill,
+ useHWAA,
+ path->getFillType(),
appliedClip.hasStencilClip(),
stencilAttachment->bits(),
appliedClip.scissorState(),
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/batches/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698