From fa66294c7705831808ce7772d4328fc626d45034 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Thu, 17 May 2012 12:20:22 +0000 Subject: 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 --- src/gpu/GrAAConvexPathRenderer.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/gpu/GrAAConvexPathRenderer.cpp') 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, -- cgit v1.2.3