SkPath::Direction serves two masters:
- input param to addFoo (e.g. addRect), where only CW or CCW are valid)
- output param from computing functions, that sometimes return kUnknown
This CL's intent is to split these into distinct enums/features:
- Direction (public) loses kUnknown, and is only used for input
- FirstDirection (private) is used for computing the first direction we see when analyzing a contour
BUG=skia:
Review URL: https://codereview.chromium.org/1176953002
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index 0cef3fa..0048279 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -7,7 +7,7 @@
#include "GrConvexPolyEffect.h"
#include "GrInvariantOutput.h"
-#include "SkPath.h"
+#include "SkPathPriv.h"
#include "gl/GrGLProcessor.h"
#include "gl/GrGLSL.h"
#include "gl/builders/GrGLProgramBuilder.h"
@@ -279,8 +279,8 @@
SkPoint pts[kMaxEdges];
SkScalar edges[3 * kMaxEdges];
- SkPath::Direction dir;
- SkAssertResult(path.cheapComputeDirection(&dir));
+ SkPathPriv::FirstDirection dir;
+ SkAssertResult(SkPathPriv::CheapComputeFirstDirection(path, &dir));
SkVector t;
if (NULL == offset) {
@@ -295,7 +295,7 @@
if (pts[lastPt] != pts[i]) {
SkVector v = pts[i] - pts[lastPt];
v.normalize();
- if (SkPath::kCCW_Direction == dir) {
+ if (SkPathPriv::kCCW_FirstDirection == dir) {
edges[3 * n] = v.fY;
edges[3 * n + 1] = -v.fX;
} else {