aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAAConvexPathRenderer.cpp
diff options
context:
space:
mode:
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,