Skip to content

Commit

Permalink
Revert "Use flat version of path-direction enum"
Browse files Browse the repository at this point in the history
This reverts commit e0fbe94.

Reason for revert: need to add guard flag to flutter

Original change's description:
> Use flat version of path-direction enum
> 
> Bug: skia:9663
> Change-Id: I00077d9f2b14b3e983e6a46ef6f560cabdb1678d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242557
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>

TBR=fmalita@chromium.org,reed@google.com

Change-Id: If47173d9b203b2d3a175af290a15d986accb4703
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9663
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255831
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
  • Loading branch information
reed-at-google authored and Skia Commit-Bot committed Nov 21, 2019
1 parent b5c217b commit 0dacc6b
Show file tree
Hide file tree
Showing 83 changed files with 1,199 additions and 1,271 deletions.
4 changes: 2 additions & 2 deletions bench/BlurRectsBench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class BlurRectsBench : public Benchmark {
paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, fRadius));

SkPath path;
path.addRect(fOuter, SkPathDirection::kCW);
path.addRect(fInner, SkPathDirection::kCW);
path.addRect(fOuter, SkPath::kCW_Direction);
path.addRect(fInner, SkPath::kCW_Direction);

for (int i = 0; i < loops; i++) {
canvas->drawPath(path, paint);
Expand Down
2 changes: 1 addition & 1 deletion bench/GeometryBench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class ConvexityBench : public Benchmark {

void onDraw(int loops, SkCanvas* canvas) override {
for (int i = 0; i < loops; ++i) {
fPath.setConvexityType(SkPathConvexityType::kUnknown);
fPath.setConvexity(SkPath::kUnknown_Convexity);
(void)fPath.isConvex();
}
}
Expand Down
4 changes: 2 additions & 2 deletions bench/PathBench.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ class CirclesBench : public Benchmark {

// mimic how Chrome does circles
temp.arcTo(r, 0, 0, false);
temp.addOval(r, SkPathDirection::kCCW);
temp.addOval(r, SkPath::kCCW_Direction);
temp.arcTo(r, 360, 0, true);
temp.close();

Expand Down Expand Up @@ -1206,7 +1206,7 @@ class CommonConvexBench : public Benchmark {
fPath.addRRect(SkRRect::MakeRectXY(r, w/8.0f, h/8.0f));

if (forceConcave) {
fPath.setConvexityType(SkPathConvexityType::kConcave);
fPath.setConvexity(SkPath::kConcave_Convexity);
SkASSERT(!fPath.isConvex());
} else {
SkASSERT(fPath.isConvex());
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Arc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void draw(SkCanvas* canvas) {
path.arcTo({56, 56}, {32, 56}, 24);
break;
case '5':
path.arcTo({24, 24}, 0, SkPath::kSmall_ArcSize, SkPathDirection::kCW, {32, 56});
path.arcTo({24, 24}, 0, SkPath::kSmall_ArcSize, SkPath::kCW_Direction, {32, 56});
break;
case '6':
path.conicTo({56, 56}, {32, 56}, SK_ScalarRoot2Over2);
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_ArcSize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ void draw(SkCanvas* canvas) {
SkPaint paint;
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
for (auto sweep: { SkPathDirection::kCW, SkPathDirection::kCCW } ) {
for (auto sweep: { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
for (auto arcSize : { SkPath::kSmall_ArcSize, SkPath::kLarge_ArcSize } ) {
SkPath path;
path.moveTo({120, 50});
path.arcTo(70, 40, 30, arcSize, sweep, 156, 100);
if (SkPathDirection::kCCW == sweep && SkPath::kLarge_ArcSize == arcSize) {
if (SkPath::kCCW_Direction == sweep && SkPath::kLarge_ArcSize == arcSize) {
paint.setColor(SK_ColorBLUE);
paint.setStrokeWidth(3);
}
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_Direction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ void draw(SkCanvas* canvas) {
arrowPath.addPoly(arrow, SK_ARRAY_COUNT(arrow), true);
arrowPaint.setPathEffect(SkPath1DPathEffect::Make(arrowPath, 320, 0,
SkPath1DPathEffect::kRotate_Style));
for (auto direction : { SkPathDirection::kCW, SkPathDirection::kCCW } ) {
for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
canvas->drawRect(rect, rectPaint);
for (unsigned start : { 0, 1, 2, 3 } ) {
SkPath path;
path.addRect(rect, direction, start);
canvas->drawPath(path, arrowPaint);
}
canvas->drawString(SkPathDirection::kCW == direction ? "CW" : "CCW", rect.centerX(),
canvas->drawString(SkPath::kCW_Direction == direction ? "CW" : "CCW", rect.centerX(),
rect.centerY(), textPaint);
canvas->translate(120, 0);
}
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/Path_FillType_a.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
REG_FIDDLE(Path_FillType_a, 256, 100, false, 0) {
void draw(SkCanvas* canvas) {
SkPath path;
path.addRect({10, 10, 30, 30}, SkPathDirection::kCW);
path.addRect({20, 20, 40, 40}, SkPathDirection::kCW);
path.addRect({10, 60, 30, 80}, SkPathDirection::kCW);
path.addRect({20, 70, 40, 90}, SkPathDirection::kCCW);
path.addRect({10, 10, 30, 30}, SkPath::kCW_Direction);
path.addRect({20, 20, 40, 40}, SkPath::kCW_Direction);
path.addRect({10, 60, 30, 80}, SkPath::kCW_Direction);
path.addRect({20, 70, 40, 90}, SkPath::kCCW_Direction);
SkPaint strokePaint;
strokePaint.setStyle(SkPaint::kStroke_Style);
SkRect clipRect = {0, 0, 51, 100};
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_FillType_b.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
REG_FIDDLE(Path_FillType_b, 256, 230, false, 0) {
void draw(SkCanvas* canvas) {
SkPath path;
path.addRect({20, 10, 80, 70}, SkPathDirection::kCW);
path.addRect({40, 30, 100, 90}, SkPathDirection::kCW);
path.addRect({20, 10, 80, 70}, SkPath::kCW_Direction);
path.addRect({40, 30, 100, 90}, SkPath::kCW_Direction);
SkPaint strokePaint;
strokePaint.setStyle(SkPaint::kStroke_Style);
SkRect clipRect = {0, 0, 128, 128};
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Path_addCircle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void draw(SkCanvas* canvas) {
paint.setStrokeWidth(10);
for (int size = 10; size < 300; size += 20) {
SkPath path;
path.addCircle(128, 128, size, SkPathDirection::kCW);
path.addCircle(128, 128, size, SkPath::kCW_Direction);
canvas->drawPath(path, paint);
}
}
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_addOval_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void draw(SkCanvas* canvas) {
arrowPath.addPoly(arrow, SK_ARRAY_COUNT(arrow), true);
arrowPaint.setPathEffect(SkPath1DPathEffect::Make(arrowPath, 176, 0,
SkPath1DPathEffect::kRotate_Style));
for (auto direction : { SkPathDirection::kCW, SkPathDirection::kCCW } ) {
for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
for (unsigned start : { 0, 1, 2, 3 } ) {
SkPath path;
path.addOval(rect, direction, start);
Expand All @@ -26,7 +26,7 @@ void draw(SkCanvas* canvas) {
canvas->translate(64, 0);
}
canvas->translate(-256, 72);
canvas->drawString(SkPathDirection::kCW == direction ? "clockwise" : "counterclockwise",
canvas->drawString(SkPath::kCW_Direction == direction ? "clockwise" : "counterclockwise",
128, 0, textPaint);
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Path_addPath_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void draw(SkCanvas* canvas) {
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
SkPath dest, path;
path.addOval({-80, 20, 0, 60}, SkPathDirection::kCW, 1);
path.addOval({-80, 20, 0, 60}, SkPath::kCW_Direction, 1);
for (int i = 0; i < 2; i++) {
dest.addPath(path, SkPath::kExtend_AddPathMode);
dest.offset(100, 0);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Path_addPath_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ void draw(SkCanvas* canvas) {
SkPaint paint;
paint.setStyle(SkPaint::kStroke_Style);
SkPath dest, path;
path.addOval({20, 20, 200, 120}, SkPathDirection::kCW, 1);
path.addOval({20, 20, 200, 120}, SkPath::kCW_Direction, 1);
for (int i = 0; i < 6; i++) {
SkMatrix matrix;
matrix.reset();
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Path_addRRect_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void draw(SkCanvas* canvas) {
canvas->drawPath(path, paint);
for (int start = 0; start < 8; ++start) {
SkPath textPath;
textPath.addRRect(rrect, SkPathDirection::kCW, start);
textPath.addRRect(rrect, SkPath::kCW_Direction, start);
SkPathMeasure pathMeasure(textPath, false);
SkPoint position;
SkVector tangent;
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_addRect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ void draw(SkCanvas* canvas) {
paint.setStyle(SkPaint::kStroke_Style);
paint.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 0));
SkPath path;
path.addRect({20, 20, 100, 100}, SkPathDirection::kCW);
path.addRect({20, 20, 100, 100}, SkPath::kCW_Direction);
canvas->drawPath(path, paint);
path.rewind();
path.addRect({140, 20, 220, 100}, SkPathDirection::kCCW);
path.addRect({140, 20, 220, 100}, SkPath::kCCW_Direction);
canvas->drawPath(path, paint);
}
} // END FIDDLE
2 changes: 1 addition & 1 deletion docs/examples/Path_addRect_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void draw(SkCanvas* canvas) {
arrowPath.addPoly(arrow, SK_ARRAY_COUNT(arrow), true);
arrowPaint.setPathEffect(SkPath1DPathEffect::Make(arrowPath, 176, 0,
SkPath1DPathEffect::kRotate_Style));
for (auto direction : { SkPathDirection::kCW, SkPathDirection::kCCW } ) {
for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
for (unsigned start : { 0, 1, 2, 3 } ) {
SkPath path;
path.addRect(rect, direction, start);
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Path_addRect_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void draw(SkCanvas* canvas) {
float intervals[] = { 5, 21.75f };
paint.setStyle(SkPaint::kStroke_Style);
paint.setPathEffect(SkDashPathEffect::Make(intervals, SK_ARRAY_COUNT(intervals), 0));
for (auto direction : { SkPathDirection::kCW, SkPathDirection::kCCW } ) {
for (auto direction : { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
SkPath path;
path.addRect(20, 20, 100, 100, direction);
canvas->drawPath(path, paint);
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_arcTo_4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ void draw(SkCanvas* canvas) {
SkPaint paint;
paint.setAntiAlias(true);
paint.setStyle(SkPaint::kStroke_Style);
for (auto sweep: { SkPathDirection::kCW, SkPathDirection::kCCW } ) {
for (auto sweep: { SkPath::kCW_Direction, SkPath::kCCW_Direction } ) {
for (auto arcSize : { SkPath::kSmall_ArcSize, SkPath::kLarge_ArcSize } ) {
SkPath path;
path.moveTo({120, 50});
path.arcTo(70, 40, 30, arcSize, sweep, 120.1f, 50);
if (SkPathDirection::kCCW == sweep && SkPath::kLarge_ArcSize == arcSize) {
if (SkPath::kCCW_Direction == sweep && SkPath::kLarge_ArcSize == arcSize) {
paint.setColor(SK_ColorBLUE);
paint.setStrokeWidth(3);
}
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_getConvexity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ REG_FIDDLE(Path_getConvexity, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
auto debugster = [](const char* prefix, const SkPath& path) -> void {
SkDebugf("%s path convexity is %s\n", prefix,
SkPathConvexityType::kUnknown == path.getConvexityType() ? "unknown" :
SkPathConvexityType::kConvex == path.getConvexityType() ? "convex" : "concave"); };
SkPath::kUnknown_Convexity == path.getConvexity() ? "unknown" :
SkPath::kConvex_Convexity == path.getConvexity() ? "convex" : "concave"); };
SkPath path;
debugster("initial", path);
path.lineTo(50, 0);
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/Path_getConvexityOrUnknown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ REG_FIDDLE(Path_getConvexityOrUnknown, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
auto debugster = [](const char* prefix, const SkPath& path) -> void {
SkDebugf("%s path convexity is %s\n", prefix,
SkPathConvexityType::kUnknown == path.getConvexityTypeOrUnknown() ? "unknown" :
SkPathConvexityType::kConvex == path.getConvexityTypeOrUnknown() ? "convex" : "concave"); };
SkPath::kUnknown_Convexity == path.getConvexityOrUnknown() ? "unknown" :
SkPath::kConvex_Convexity == path.getConvexityOrUnknown() ? "convex" : "concave"); };
SkPath path;
debugster("initial", path);
path.lineTo(50, 0);
debugster("first line", path);
path.getConvexityType();
path.getConvexity();
path.lineTo(50, 50);
debugster("second line", path);
path.lineTo(100, 50);
path.getConvexityType();
path.getConvexity();
debugster("third line", path);
}
} // END FIDDLE
4 changes: 2 additions & 2 deletions docs/examples/Path_isRect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ REG_FIDDLE(Path_isRect, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
auto debugster = [](const char* prefix, const SkPath& path) -> void {
SkRect rect;
SkPathDirection direction;
SkPath::Direction direction;
bool isClosed;
path.isRect(&rect, &isClosed, &direction) ?
SkDebugf("%s is rect (%g, %g, %g, %g); is %s" "closed; direction %s\n", prefix,
rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, isClosed ? "" : "not ",
SkPathDirection::kCW == direction ? "CW" : "CCW") :
SkPath::kCW_Direction == direction ? "CW" : "CCW") :
SkDebugf("%s is not rect\n", prefix);
};
SkPath path;
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/Path_notequal_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ void draw(SkCanvas* canvas) {
one.addRect({10, 20, 30, 40});
two.addRect({10, 20, 30, 40});
debugster("add rect", one, two);
one.setConvexityType(SkPathConvexityType::kConcave);
one.setConvexity(SkPath::kConcave_Convexity);
debugster("setConvexity", one, two);
SkDebugf("convexity %c=\n", one.getConvexityType() == two.getConvexityType() ? '=' : '!');
SkDebugf("convexity %c=\n", one.getConvexity() == two.getConvexity() ? '=' : '!');
}
} // END FIDDLE
2 changes: 1 addition & 1 deletion docs/examples/Path_rArcTo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void draw(SkCanvas* canvas) {
const SkPoint starts[] = {{20, 20}, {120, 20}, {70, 60}};
for (auto start : starts) {
path.moveTo(start.fX, start.fY);
path.rArcTo(20, 20, 0, SkPath::kSmall_ArcSize, SkPathDirection::kCCW, 60, 0);
path.rArcTo(20, 20, 0, SkPath::kSmall_ArcSize, SkPath::kCCW_Direction, 60, 0);
}
canvas->drawPath(path, paint);
}
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/Path_rMoveTo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
REG_FIDDLE(Path_rMoveTo, 256, 100, false, 0) {
void draw(SkCanvas* canvas) {
SkPath path;
path.addRect({20, 20, 80, 80}, SkPathDirection::kCW, 2);
path.addRect({20, 20, 80, 80}, SkPath::kCW_Direction, 2);
path.rMoveTo(25, 2);
SkVector arrow[] = {{0, -4}, {-20, 0}, {0, -3}, {-5, 5}, {5, 5}, {0, -3}, {20, 0}};
for (unsigned i = 0; i < SK_ARRAY_COUNT(arrow); ++i) {
Expand Down
8 changes: 4 additions & 4 deletions docs/examples/Path_setConvexity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ REG_FIDDLE(Path_setConvexity, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
auto debugster = [](const char* prefix, const SkPath& path) -> void {
SkDebugf("%s path convexity is %s\n", prefix,
SkPathConvexityType::kUnknown == path.getConvexityTypeOrUnknown() ? "unknown" :
SkPathConvexityType::kConvex == path.getConvexityTypeOrUnknown() ? "convex" : "concave"); };
SkPath::kUnknown_Convexity == path.getConvexity() ? "unknown" :
SkPath::kConvex_Convexity == path.getConvexity() ? "convex" : "concave"); };
SkPoint quad[] = {{70, 70}, {20, 20}, {120, 20}, {120, 120}};
SkPath path;
path.addPoly(quad, SK_ARRAY_COUNT(quad), true);
debugster("initial", path);
path.setConvexityType(SkPathConvexityType::kConcave);
path.setConvexity(SkPath::kConcave_Convexity);
debugster("after forcing concave", path);
path.setConvexityType(SkPathConvexityType::kUnknown);
path.setConvexity(SkPath::kUnknown_Convexity);
debugster("after forcing unknown", path);
}
} // END FIDDLE
4 changes: 2 additions & 2 deletions docs/examples/RRect_setRectRadii.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ void draw(SkCanvas* canvas) {
SkRRect rrect;
SkVector corners[] = {{15, 17}, {17, 19}, {19, 15}, {15, 15}};
rrect.setRectRadii({20, 20, 100, 100}, corners);
path.addRRect(rrect, SkPathDirection::kCW);
path.addRRect(rrect, SkPath::kCW_Direction);
canvas->drawPath(path, paint);
path.rewind();
path.addRRect(rrect, SkPathDirection::kCCW, 1);
path.addRRect(rrect, SkPath::kCCW_Direction, 1);
canvas->translate(120, 0);
canvas->drawPath(path, paint);
}
Expand Down
18 changes: 9 additions & 9 deletions fuzz/FuzzCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void FuzzNicePath(Fuzz* fuzz, SkPath* path, int maxOps) {
SkMatrix m;
SkRRect rr;
SkRect r;
SkPathDirection dir;
SkPath::Direction dir;
unsigned int ui;
SkScalar a, b, c, d, e, f;
switch (op) {
Expand Down Expand Up @@ -112,32 +112,32 @@ void FuzzNicePath(Fuzz* fuzz, SkPath* path, int maxOps) {
case 13:
fuzz_nice_rect(fuzz, &r);
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
path->addRect(r, dir);
break;
case 14:
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
fuzz_nice_rect(fuzz, &r);
fuzz->next(&ui);
path->addRect(r, dir, ui);
break;
case 15:
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
fuzz_nice_rect(fuzz, &r);
path->addOval(r, dir);
break;
case 16:
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
fuzz_nice_rect(fuzz, &r);
fuzz->next(&ui);
path->addOval(r, dir, ui);
break;
case 17:
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
fuzz_nice_float(fuzz, &a, &b, &c);
path->addCircle(a, b, c, dir);
break;
Expand All @@ -150,18 +150,18 @@ void FuzzNicePath(Fuzz* fuzz, SkPath* path, int maxOps) {
fuzz_nice_float(fuzz, &a, &b);
fuzz_nice_rect(fuzz, &r);
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
path->addRoundRect(r, a, b, dir);
break;
case 20:
FuzzNiceRRect(fuzz, &rr);
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
path->addRRect(rr, dir);
break;
case 21:
fuzz->nextRange(&ui, 0, 1);
dir = static_cast<SkPathDirection>(ui);
dir = static_cast<SkPath::Direction>(ui);
FuzzNiceRRect(fuzz, &rr);
path->addRRect(rr, dir, ui);
break;
Expand Down
2 changes: 1 addition & 1 deletion gm/aaa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ DEF_SIMPLE_GM(analytic_antialias_convex, canvas, W, H) {
SkBits2Float(0x4344f079), SkBits2Float(0x4397e900), SkBits2Float(0x3f3504f3));
path.close();
// Manually setting convexity is required. Otherwise, this path will be considered concave.
path.setConvexityType(SkPathConvexityType::kConvex);
path.setConvexity(SkPath::kConvex_Convexity);
canvas->drawPath(path, p);

// skbug.com/7573
Expand Down
Loading

0 comments on commit 0dacc6b

Please sign in to comment.