Remove SkPathPriv::IsConvex() if SK_LEGACY_PATH_CONVEXITY
is defined to fix the Google3 roll.

TBR=ethannicholas@google.com

Bug: skia:
Change-Id: I2d2177213ec43dd048f15685d0afe49fb07656fe
Reviewed-on: https://skia-review.googlesource.com/c/177680
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Cary Clark <caryclark@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
This commit is contained in:
Cary Clark 2018-12-13 15:40:04 -05:00 committed by Skia Commit-Bot
parent f1ad4ed044
commit 21a7be0741
2 changed files with 4 additions and 0 deletions

View File

@ -167,6 +167,7 @@ public:
return path.fPathRef->conicWeights();
}
#ifndef SK_LEGACY_PATH_CONVEXITY
/** Returns true if path formed by pts is convex.
@param pts SkPoint array of path
@ -175,6 +176,7 @@ public:
@return true if pts represent a convex geometry
*/
static bool IsConvex(const SkPoint pts[], int count);
#endif
/** Returns true if the underlying SkPathRef has one single owner. */
static bool TestingOnly_unique(const SkPath& path) {

View File

@ -1320,6 +1320,7 @@ static void check_convexity(skiatest::Reporter* reporter, const SkPath& path,
SkPath copy(path); // we make a copy so that we don't cache the result on the passed in path.
SkPath::Convexity c = copy.getConvexity();
REPORTER_ASSERT(reporter, c == expected);
#ifndef SK_LEGACY_PATH_CONVEXITY
// test points-by-array interface
SkPath::Iter iter(path, true);
int initialMoves = 0;
@ -1335,6 +1336,7 @@ static void check_convexity(skiatest::Reporter* reporter, const SkPath& path,
bool isConvex = SkPathPriv::IsConvex(&points.front() + skip, points.size() - skip);
REPORTER_ASSERT(reporter, isConvex == (SkPath::kConvex_Convexity == expected));
}
#endif
}
static void test_path_crbug389050(skiatest::Reporter* reporter) {