Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: src/gpu/GrPathUtils.cpp

Issue 1176953002: move SkPath direction-as-computed into SkPathPriv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrPathUtils.cpp
diff --git a/src/gpu/GrPathUtils.cpp b/src/gpu/GrPathUtils.cpp
index 3e2c3bfe6691655ebf4f6b56dea15d9c8e02af4b..21d115569b495776a3e22ac4a9e2696df7e6f9cf 100644
--- a/src/gpu/GrPathUtils.cpp
+++ b/src/gpu/GrPathUtils.cpp
@@ -365,16 +365,16 @@ bool is_point_within_cubic_tangents(const SkPoint& a,
const SkVector& ab,
const SkVector& dc,
const SkPoint& d,
- SkPath::Direction dir,
+ SkPathPriv::FirstDirection dir,
const SkPoint p) {
SkVector ap = p - a;
SkScalar apXab = ap.cross(ab);
- if (SkPath::kCW_Direction == dir) {
+ if (SkPathPriv::kCW_FirstDirection == dir) {
if (apXab > 0) {
return false;
}
} else {
- SkASSERT(SkPath::kCCW_Direction == dir);
+ SkASSERT(SkPathPriv::kCCW_FirstDirection == dir);
if (apXab < 0) {
return false;
}
@@ -382,12 +382,12 @@ bool is_point_within_cubic_tangents(const SkPoint& a,
SkVector dp = p - d;
SkScalar dpXdc = dp.cross(dc);
- if (SkPath::kCW_Direction == dir) {
+ if (SkPathPriv::kCW_FirstDirection == dir) {
if (dpXdc < 0) {
return false;
}
} else {
- SkASSERT(SkPath::kCCW_Direction == dir);
+ SkASSERT(SkPathPriv::kCCW_FirstDirection == dir);
if (dpXdc > 0) {
return false;
}
@@ -398,7 +398,7 @@ bool is_point_within_cubic_tangents(const SkPoint& a,
void convert_noninflect_cubic_to_quads(const SkPoint p[4],
SkScalar toleranceSqd,
bool constrainWithinTangents,
- SkPath::Direction dir,
+ SkPathPriv::FirstDirection dir,
SkTArray<SkPoint, true>* quads,
int sublevel = 0) {
@@ -546,7 +546,7 @@ void convert_noninflect_cubic_to_quads(const SkPoint p[4],
void GrPathUtils::convertCubicToQuads(const SkPoint p[4],
SkScalar tolScale,
bool constrainWithinTangents,
- SkPath::Direction dir,
+ SkPathPriv::FirstDirection dir,
SkTArray<SkPoint, true>* quads) {
SkPoint chopped[10];
int count = SkChopCubicAtInflections(p, chopped);

Powered by Google App Engine
This is Rietveld 408576698