summaryrefslogtreecommitdiffstats
path: root/gfx/skia/skia/src/core/SkPath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/skia/skia/src/core/SkPath.cpp')
-rw-r--r--gfx/skia/skia/src/core/SkPath.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/gfx/skia/skia/src/core/SkPath.cpp b/gfx/skia/skia/src/core/SkPath.cpp
index db160d9b7..8f93c9c18 100644
--- a/gfx/skia/skia/src/core/SkPath.cpp
+++ b/gfx/skia/skia/src/core/SkPath.cpp
@@ -716,11 +716,9 @@ void SkPath::setConvexity(Convexity c) {
fFirstDirection = SkPathPriv::kUnknown_FirstDirection; \
} while (0)
-void SkPath::incReserve(int inc) {
+void SkPath::incReserve(U16CPU inc) {
SkDEBUGCODE(this->validate();)
- if (inc > 0) {
- SkPathRef::Editor(&fPathRef, inc, inc);
- }
+ SkPathRef::Editor(&fPathRef, inc, inc);
SkDEBUGCODE(this->validate();)
}
@@ -1693,13 +1691,6 @@ static void subdivide_cubic_to(SkPath* path, const SkPoint pts[4],
}
void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
- if (matrix.isIdentity()) {
- if (dst != nullptr && dst != this) {
- *dst = *this;
- }
- return;
- }
-
SkDEBUGCODE(this->validate();)
if (dst == nullptr) {
dst = (SkPath*)this;
@@ -1747,20 +1738,13 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
matrix.mapPoints(ed.points(), ed.pathRef()->countPoints());
dst->fFirstDirection = SkPathPriv::kUnknown_FirstDirection;
} else {
- Convexity convexity = Convexity(fConvexity);
-
SkPathRef::CreateTransformedCopy(&dst->fPathRef, *fPathRef.get(), matrix);
if (this != dst) {
dst->fFillType = fFillType;
+ dst->fConvexity = fConvexity;
dst->fIsVolatile = fIsVolatile;
}
-
- if (matrix.isScaleTranslate() && SkPathPriv::IsAxisAligned(*this)) {
- dst->fConvexity = convexity;
- } else {
- dst->fConvexity = kUnknown_Convexity;
- }
if (SkPathPriv::kUnknown_FirstDirection == fFirstDirection) {
dst->fFirstDirection = SkPathPriv::kUnknown_FirstDirection;
@@ -1774,6 +1758,7 @@ void SkPath::transform(const SkMatrix& matrix, SkPath* dst) const {
} else if (det2x2 > 0) {
dst->fFirstDirection = fFirstDirection.load();
} else {
+ dst->fConvexity = kUnknown_Convexity;
dst->fFirstDirection = SkPathPriv::kUnknown_FirstDirection;
}
}