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/gpu/geometry/GrShape.cpp b/src/gpu/geometry/GrShape.cpp
index 4fc3472..a510a19 100644
--- a/src/gpu/geometry/GrShape.cpp
+++ b/src/gpu/geometry/GrShape.cpp
@@ -201,7 +201,7 @@
const int conicWeightCnt = SkPathPriv::ConicWeightCnt(path);
SkASSERT(verbCnt <= GrShape::kMaxKeyFromDataVerbCnt);
SkASSERT(pointCnt && verbCnt);
- *key++ = path.getFillType();
+ *key++ = (uint32_t)path.getFillType();
*key++ = verbCnt;
memcpy(key, SkPathPriv::VerbData(path), verbCnt * sizeof(uint8_t));
int verbKeySize = SkAlign4(verbCnt);
@@ -273,7 +273,7 @@
case Type::kRRect:
fRRectData.fRRect.writeToMemory(key);
key += SkRRect::kSizeInMemory / sizeof(uint32_t);
- *key = (fRRectData.fDir == SkPath::kCCW_Direction) ? (1 << 31) : 0;
+ *key = (fRRectData.fDir == SkPathDirection::kCCW) ? (1 << 31) : 0;
*key |= fRRectData.fInverted ? (1 << 30) : 0;
*key++ |= fRRectData.fStart;
SkASSERT(fRRectData.fStart < 8);
@@ -297,7 +297,7 @@
*key++ = fPathData.fGenID;
// We could canonicalize the fill rule for paths that don't differentiate between
// even/odd or winding fill (e.g. convex).
- *key++ = this->path().getFillType();
+ *key++ = (uint32_t)this->path().getFillType();
break;
}
}
@@ -507,7 +507,7 @@
void GrShape::attemptToSimplifyPath() {
SkRect rect;
SkRRect rrect;
- SkPath::Direction rrectDir;
+ SkPathDirection rrectDir;
unsigned rrectStart;
bool inverted = this->path().isInverseFillType();
SkPoint pts[2];