fix roll
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:
parent
f1ad4ed044
commit
21a7be0741
@ -167,6 +167,7 @@ public:
|
|||||||
return path.fPathRef->conicWeights();
|
return path.fPathRef->conicWeights();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SK_LEGACY_PATH_CONVEXITY
|
||||||
/** Returns true if path formed by pts is convex.
|
/** Returns true if path formed by pts is convex.
|
||||||
|
|
||||||
@param pts SkPoint array of path
|
@param pts SkPoint array of path
|
||||||
@ -175,6 +176,7 @@ public:
|
|||||||
@return true if pts represent a convex geometry
|
@return true if pts represent a convex geometry
|
||||||
*/
|
*/
|
||||||
static bool IsConvex(const SkPoint pts[], int count);
|
static bool IsConvex(const SkPoint pts[], int count);
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Returns true if the underlying SkPathRef has one single owner. */
|
/** Returns true if the underlying SkPathRef has one single owner. */
|
||||||
static bool TestingOnly_unique(const SkPath& path) {
|
static bool TestingOnly_unique(const SkPath& path) {
|
||||||
|
@ -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 copy(path); // we make a copy so that we don't cache the result on the passed in path.
|
||||||
SkPath::Convexity c = copy.getConvexity();
|
SkPath::Convexity c = copy.getConvexity();
|
||||||
REPORTER_ASSERT(reporter, c == expected);
|
REPORTER_ASSERT(reporter, c == expected);
|
||||||
|
#ifndef SK_LEGACY_PATH_CONVEXITY
|
||||||
// test points-by-array interface
|
// test points-by-array interface
|
||||||
SkPath::Iter iter(path, true);
|
SkPath::Iter iter(path, true);
|
||||||
int initialMoves = 0;
|
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);
|
bool isConvex = SkPathPriv::IsConvex(&points.front() + skip, points.size() - skip);
|
||||||
REPORTER_ASSERT(reporter, isConvex == (SkPath::kConvex_Convexity == expected));
|
REPORTER_ASSERT(reporter, isConvex == (SkPath::kConvex_Convexity == expected));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_path_crbug389050(skiatest::Reporter* reporter) {
|
static void test_path_crbug389050(skiatest::Reporter* reporter) {
|
||||||
|
Loading…
Reference in New Issue
Block a user