Index: src/gpu/GrClipMaskManager.cpp |
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp |
index 84658807e331a9202da9c16831f55a74dc3cd650..3da69c11a25efcb598d979b2a7512ca2c0788bf8 100644 |
--- a/src/gpu/GrClipMaskManager.cpp |
+++ b/src/gpu/GrClipMaskManager.cpp |
@@ -809,6 +809,20 @@ void GrClipMaskManager::setGpuStencil() { |
} |
GrStencilSettings settings; |
+ |
+ // TODO: dynamically attach a stencil buffer |
+ int stencilBits = 0; |
+ GrStencilBuffer* stencilBuffer = |
+ drawState.getRenderTarget()->getStencilBuffer(); |
+ if (NULL != stencilBuffer) { |
+ stencilBits = stencilBuffer->bits(); |
+ if (fGpu->caps()->pathRenderingSupport()) { |
+ settings = fGpu->getPathStencilSettingsForFillType(drawState.getPathStencilFillType()); |
+ this->adjustStencilParams(&settings, clipMode, stencilBits); |
+ fGpu->setPathStencilSettings(settings); |
+ } |
+ } |
+ |
// The GrGpu client may not be using the stencil buffer but we may need to |
// enable it in order to respect a stencil clip. |
if (drawState.getStencil().isDisabled()) { |
@@ -822,14 +836,6 @@ void GrClipMaskManager::setGpuStencil() { |
settings = drawState.getStencil(); |
} |
- // TODO: dynamically attach a stencil buffer |
- int stencilBits = 0; |
- GrStencilBuffer* stencilBuffer = |
- drawState.getRenderTarget()->getStencilBuffer(); |
- if (NULL != stencilBuffer) { |
- stencilBits = stencilBuffer->bits(); |
- } |
- |
SkASSERT(fGpu->caps()->stencilWrapOpsSupport() || !settings.usesWrapOp()); |
SkASSERT(fGpu->caps()->twoSidedStencilSupport() || !settings.isTwoSided()); |
this->adjustStencilParams(&settings, clipMode, stencilBits); |