Replace Outline#setConvexPath with Outline#setPath
Bug: 148544953
Test: No change in behavior, no new tests
setConvexPath no longer requires that the Path be Convex, so deprecate
the method and replace it with a name that does not imply it must be
Convex.
Update internal references to the Path being Convex as well.
Change-Id: I8935dc8ac7f7fb7db0d667e35fda67afdf2e6ac8
diff --git a/libs/hwui/Outline.h b/libs/hwui/Outline.h
index f1c3803..2eb2c7c 100644
--- a/libs/hwui/Outline.h
+++ b/libs/hwui/Outline.h
@@ -26,7 +26,7 @@
class Outline {
public:
- enum class Type { None = 0, Empty = 1, ConvexPath = 2, RoundRect = 3 };
+ enum class Type { None = 0, Empty = 1, Path = 2, RoundRect = 3 };
Outline() : mShouldClip(false), mType(Type::None), mRadius(0), mAlpha(0.0f) {}
@@ -57,12 +57,12 @@
}
}
- void setConvexPath(const SkPath* outline, float alpha) {
+ void setPath(const SkPath* outline, float alpha) {
if (!outline) {
setEmpty();
return;
}
- mType = Type::ConvexPath;
+ mType = Type::Path;
mPath = *outline;
mBounds.set(outline->getBounds());
mAlpha = alpha;