aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClipMaskManager.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-28 18:48:06 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-28 18:48:06 +0000
commitded4f4b163f5aa19c22c871178c55ecb34623846 (patch)
tree20c052999f9345c8cc8d0196e92760a5f4ca9273 /src/gpu/GrClipMaskManager.cpp
parent28060e7c940b07038bdaa3c5f8d1d87cf199e228 (diff)
Initial support for GL_NV_path_renering. Experimental, there are still some issues to resolve, set gyp variable skia_nv_path_rendering=1 or build flag GR_GL_USE_NV_PATH_RENDERING to enable.
Diffstat (limited to 'src/gpu/GrClipMaskManager.cpp')
-rw-r--r--src/gpu/GrClipMaskManager.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index cb543e1979..30944d95bb 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -687,9 +687,9 @@ bool GrClipMaskManager::createStencilClipMask(const GrClip& clipIn,
bool clearToInside;
SkRegion::Op startOp = SkRegion::kReplace_Op; // suppress warning
int start = process_initial_clip_elements(clipCopy,
- rtRect,
- &clearToInside,
- &startOp);
+ rtRect,
+ &clearToInside,
+ &startOp);
fGpu->clearStencilClip(bounds, clearToInside);
@@ -700,6 +700,14 @@ bool GrClipMaskManager::createStencilClipMask(const GrClip& clipIn,
bool fillInverted;
// enabled at bottom of loop
drawState->disableState(GrGpu::kModifyStencilClip_StateBit);
+ // if the target is MSAA then we want MSAA enabled when the clip is soft
+ if (rt->isMultisampled()) {
+ if (clipCopy.getDoAA(c)) {
+ drawState->enableState(GrDrawState::kHWAntialias_StateBit);
+ } else {
+ drawState->disableState(GrDrawState::kHWAntialias_StateBit);
+ }
+ }
bool canRenderDirectToStencil; // can the clip element be drawn
// directly to the stencil buffer