diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-17 12:20:22 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-05-17 12:20:22 +0000 |
commit | fa66294c7705831808ce7772d4328fc626d45034 (patch) | |
tree | 809fc86e53ef8f0c2373fcd9e7edaf0d1ad4d166 /src/gpu/GrAAConvexPathRenderer.cpp | |
parent | 5acc0e36d987dff3172fd45a14b66c52a51d49e4 (diff) |
First functioning version of SW-only clip mask creator
http://codereview.appspot.com/6208072/
git-svn-id: http://skia.googlecode.com/svn/trunk@3984 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrAAConvexPathRenderer.cpp')
-rw-r--r-- | src/gpu/GrAAConvexPathRenderer.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp index ca7ecdcb4a..3da4af2def 100644 --- a/src/gpu/GrAAConvexPathRenderer.cpp +++ b/src/gpu/GrAAConvexPathRenderer.cpp @@ -430,19 +430,26 @@ void create_vertices(const SegmentArray& segments, } -bool GrAAConvexPathRenderer::canDrawPath(const SkPath& path, - GrPathFill fill, - const GrDrawTarget* target, - bool antiAlias) const { +bool GrAAConvexPathRenderer::staticCanDrawPath(bool pathIsConvex, + GrPathFill fill, + const GrDrawTarget* target, + bool antiAlias) { if (!target->getCaps().fShaderDerivativeSupport || !antiAlias || kHairLine_PathFill == fill || GrIsFillInverted(fill) || - !path.isConvex()) { + !pathIsConvex) { return false; } else { return true; } } +bool GrAAConvexPathRenderer::canDrawPath(const SkPath& path, + GrPathFill fill, + const GrDrawTarget* target, + bool antiAlias) const { + return staticCanDrawPath(path.isConvex(), fill, target, antiAlias); +} + bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath, GrPathFill fill, const GrVec* translate, |