Revert "add guard to switch to SkPathTypes"
This reverts commit e1af44498b6e40c448811e6efc4412272cc10ca7.
Reason for revert: breaking google3?
Original change's description:
> add guard to switch to SkPathTypes
>
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=robertphillips@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com
Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/modules/pathkit/pathkit_wasm_bindings.cpp b/modules/pathkit/pathkit_wasm_bindings.cpp
index 7e2f285..c47af69 100644
--- a/modules/pathkit/pathkit_wasm_bindings.cpp
+++ b/modules/pathkit/pathkit_wasm_bindings.cpp
@@ -318,7 +318,7 @@
// Path2D API things
// ======================================================================================
void ApplyAddRect(SkPath& path, SkScalar x, SkScalar y, SkScalar width, SkScalar height) {
- path.addRect({x, y, x+width, y+height});
+ path.addRect(x, y, x+width, y+height);
}
void ApplyAddArc(SkPath& path, SkScalar x, SkScalar y, SkScalar radius,
@@ -356,9 +356,9 @@
}
JSString GetFillTypeString(const SkPath& path) {
- if ((SkPathFillType)path.getFillType() == SkPathFillType::kWinding) {
+ if (path.getFillType() == SkPath::FillType::kWinding_FillType) {
return emscripten::val("nonzero");
- } else if ((SkPathFillType)path.getFillType() == SkPathFillType::kEvenOdd) {
+ } else if (path.getFillType() == SkPath::FillType::kEvenOdd_FillType) {
return emscripten::val("evenodd");
} else {
SkDebugf("warning: can't translate inverted filltype to HTML Canvas\n");
@@ -503,7 +503,7 @@
.function("_rect", &ApplyAddRect)
// Extra features
- .function("setFillType", select_overload<void(SkPathFillType)>(&SkPath::setFillType))
+ .function("setFillType", &SkPath::setFillType)
.function("getFillType", &SkPath::getFillType)
.function("getFillTypeString", &GetFillTypeString)
.function("getBounds", &SkPath::getBounds)
@@ -564,11 +564,11 @@
.value("XOR", SkPathOp::kXOR_SkPathOp)
.value("REVERSE_DIFFERENCE", SkPathOp::kReverseDifference_SkPathOp);
- enum_<SkPathFillType>("FillType")
- .value("WINDING", SkPathFillType::kWinding)
- .value("EVENODD", SkPathFillType::kEvenOdd)
- .value("INVERSE_WINDING", SkPathFillType::kInverseWinding)
- .value("INVERSE_EVENODD", SkPathFillType::kInverseEvenOdd);
+ enum_<SkPath::FillType>("FillType")
+ .value("WINDING", SkPath::FillType::kWinding_FillType)
+ .value("EVENODD", SkPath::FillType::kEvenOdd_FillType)
+ .value("INVERSE_WINDING", SkPath::FillType::kInverseWinding_FillType)
+ .value("INVERSE_EVENODD", SkPath::FillType::kInverseEvenOdd_FillType);
constant("MOVE_VERB", MOVE);
constant("LINE_VERB", LINE);