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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 22686002: Implement path cover with nv_path_rendering (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Omission with non-inverted path bounds fixed Created 7 years, 3 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
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);
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrDrawState.h » ('j') | src/gpu/GrDrawState.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698