aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/convex_all_line_paths.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-06-10 14:23:15 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-10 14:23:15 -0700
commit026beb52a29a620290fcfb24f1e7e9e75547b80f (patch)
tree42e589685254a3026b21ec1e28f285e00f4cdbb4 /gm/convex_all_line_paths.cpp
parentde50d9b94291589edf349e7a0f2aac6ac523de7b (diff)
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
Diffstat (limited to 'gm/convex_all_line_paths.cpp')
-rw-r--r--gm/convex_all_line_paths.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/gm/convex_all_line_paths.cpp b/gm/convex_all_line_paths.cpp
index 81b98b88f8..a93a7f6e47 100644
--- a/gm/convex_all_line_paths.cpp
+++ b/gm/convex_all_line_paths.cpp
@@ -6,6 +6,7 @@
*/
#include "gm.h"
+#include "SkPathPriv.h"
static void create_ngon(int n, SkPoint* pts, SkScalar width, SkScalar height) {
float angleStep = 360.0f / n, angle = 0.0f, sin, cos;
@@ -237,9 +238,9 @@ protected:
// of the GMs rows.
SkASSERT(path.isConvex());
SkASSERT(SkPath::kLine_SegmentMask == path.getSegmentMasks());
- SkPath::Direction actualDir;
- SkASSERT(path.cheapComputeDirection(&actualDir));
- SkASSERT(dir == actualDir);
+ SkPathPriv::FirstDirection actualDir;
+ SkASSERT(SkPathPriv::CheapComputeFirstDirection(path, &actualDir));
+ SkASSERT(SkPathPriv::AsFirstDirection(dir) == actualDir);
SkRect bounds = path.getBounds();
SkASSERT(SkScalarNearlyEqual(bounds.centerX(), 0.0f));
SkASSERT(bounds.height() <= kMaxPathHeight);