diff options
author | 2012-06-29 14:01:53 +0000 | |
---|---|---|
committer | 2012-06-29 14:01:53 +0000 | |
commit | 05a718c9d2302b08f859adac5854b2df6ff84e43 (patch) | |
tree | 8c9a888d7022e6250ef81e4fd6479ee7a2e5ea62 /src/gpu/GrStencilAndCoverPathRenderer.cpp | |
parent | e9c0469a491ddcbe5f1f90d0ac9f4337aa231c8b (diff) |
Fix some NV path rendering issues with perspective and inverse paths
Review URL: http://codereview.appspot.com/6347050/
git-svn-id: http://skia.googlecode.com/svn/trunk@4403 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrStencilAndCoverPathRenderer.cpp')
-rw-r--r-- | src/gpu/GrStencilAndCoverPathRenderer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp index 40d998b6e3..81dc1db00a 100644 --- a/src/gpu/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp @@ -95,7 +95,10 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const SkPath& path, GR_STATIC_CONST_SAME_STENCIL(kInvertedStencilPass, kZero_StencilOp, kZero_StencilOp, - kEqual_StencilFunc, + // We know our rect will hit pixels outside the clip and the user bits will be 0 + // outside the clip. So we can't just fill where the user bits are 0. We also need to + // check that the clip bit is set. + kEqualIfInClip_StencilFunc, 0xffff, 0x0000, 0xffff); @@ -106,7 +109,8 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const SkPath& path, // mapRect through persp matrix may not be correct if (!drawState->getViewMatrix().hasPerspective() && drawState->getViewInverse(&vmi)) { vmi.mapRect(&bounds); - // theoretically could set bloat = 0, instead leave it because of matrix inversion precision. + // theoretically could set bloat = 0, instead leave it because of matrix inversion + // precision. } else { if (stageMask) { if (!drawState->getViewInverse(&vmi)) { |