Index: src/gpu/GrPipeline.cpp |
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp |
index 761a876a1bf2e36432b8551abb3fdfccaf296a9a..d52e811df050ae131ed5b996ca47698c24a1e461 100644 |
--- a/src/gpu/GrPipeline.cpp |
+++ b/src/gpu/GrPipeline.cpp |
@@ -12,6 +12,7 @@ |
#include "GrGpu.h" |
#include "GrPipelineBuilder.h" |
#include "GrProcOptInfo.h" |
+#include "GrRenderTargetPriv.h" |
#include "GrXferProcessor.h" |
#include "batches/GrBatch.h" |
@@ -25,9 +26,9 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args, |
SkASSERT(pipeline->fRenderTarget); |
pipeline->fScissorState = *args.fScissor; |
if (builder.hasUserStencilSettings() || args.fHasStencilClip) { |
- SkASSERT(args.fNumStencilBits); |
+ const GrRenderTargetPriv& rtPriv = builder.getRenderTarget()->renderTargetPriv(); |
pipeline->fStencilSettings.reset(*builder.getUserStencil(), args.fHasStencilClip, |
- args.fNumStencilBits); |
+ rtPriv.numStencilBits()); |
SkASSERT(!pipeline->fStencilSettings.usesWrapOp() || args.fCaps->stencilWrapOpsSupport()); |
} |
pipeline->fDrawFace = builder.getDrawFace(); |
@@ -45,6 +46,9 @@ GrPipeline* GrPipeline::CreateAt(void* memory, const CreateArgs& args, |
if (builder.getAllowSRGBInputs()) { |
pipeline->fFlags |= kAllowSRGBInputs_Flag; |
} |
+ if (args.fHasStencilClip) { |
+ pipeline->fFlags |= kHasStencilClip_Flag; |
+ } |
// Create XferProcessor from DS's XPFactory |
bool hasMixedSamples = builder.getRenderTarget()->hasMixedSamples() && |