aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAAConvexPathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-17 12:20:22 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-05-17 12:20:22 +0000
commitfa66294c7705831808ce7772d4328fc626d45034 (patch)
tree809fc86e53ef8f0c2373fcd9e7edaf0d1ad4d166 /src/gpu/GrAAConvexPathRenderer.cpp
parent5acc0e36d987dff3172fd45a14b66c52a51d49e4 (diff)
First functioning version of SW-only clip mask creator
Diffstat (limited to 'src/gpu/GrAAConvexPathRenderer.cpp')
-rw-r--r--src/gpu/GrAAConvexPathRenderer.cpp17
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,