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>
diff --git a/src/c/sk_surface.cpp b/src/c/sk_surface.cpp
index b3f203f..65fe209 100644
--- a/src/c/sk_surface.cpp
+++ b/src/c/sk_surface.cpp
@@ -56,13 +56,13 @@
const struct {
sk_path_direction_t fC;
- SkPath::Direction fSk;
+ SkPathDirection fSk;
} gPathDirMap[] = {
- { CW_SK_PATH_DIRECTION, SkPath::kCW_Direction },
- { CCW_SK_PATH_DIRECTION, SkPath::kCCW_Direction },
+ { CW_SK_PATH_DIRECTION, SkPathDirection::kCW },
+ { CCW_SK_PATH_DIRECTION, SkPathDirection::kCCW },
};
-static bool from_c_path_direction(sk_path_direction_t cdir, SkPath::Direction* dir) {
+static bool from_c_path_direction(sk_path_direction_t cdir, SkPathDirection* dir) {
for (size_t i = 0; i < SK_ARRAY_COUNT(gPathDirMap); ++i) {
if (gPathDirMap[i].fC == cdir) {
if (dir) {
@@ -202,7 +202,7 @@
}
void sk_path_add_rect(sk_path_t* cpath, const sk_rect_t* crect, sk_path_direction_t cdir) {
- SkPath::Direction dir;
+ SkPathDirection dir;
if (!from_c_path_direction(cdir, &dir)) {
return;
}
@@ -210,7 +210,7 @@
}
void sk_path_add_oval(sk_path_t* cpath, const sk_rect_t* crect, sk_path_direction_t cdir) {
- SkPath::Direction dir;
+ SkPathDirection dir;
if (!from_c_path_direction(cdir, &dir)) {
return;
}