diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-17 21:31:54 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-02-17 22:15:47 +0100 |
commit | ce9d45fc59c4e8a1fa6a7f7ff8ae31c20ab7950c (patch) | |
tree | 12009b9fbe4338b92a5be9ab0e5e47c79fac5b68 | |
parent | f29d7ff617d206f793c24603a2ba9aa7505bb888 (diff) | |
download | UXP-ce9d45fc59c4e8a1fa6a7f7ff8ae31c20ab7950c.tar UXP-ce9d45fc59c4e8a1fa6a7f7ff8ae31c20ab7950c.tar.gz UXP-ce9d45fc59c4e8a1fa6a7f7ff8ae31c20ab7950c.tar.lz UXP-ce9d45fc59c4e8a1fa6a7f7ff8ae31c20ab7950c.tar.xz UXP-ce9d45fc59c4e8a1fa6a7f7ff8ae31c20ab7950c.zip |
Skia: Be consistent about int for incReserve.
Upstream port.
-rw-r--r-- | gfx/skia/skia/include/core/SkPath.h | 2 | ||||
-rw-r--r-- | gfx/skia/skia/src/core/SkPath.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gfx/skia/skia/include/core/SkPath.h b/gfx/skia/skia/include/core/SkPath.h index d1af4f31b..bde07c498 100644 --- a/gfx/skia/skia/include/core/SkPath.h +++ b/gfx/skia/skia/include/core/SkPath.h @@ -373,7 +373,7 @@ public: @param extraPtCount The number of extra points the path should preallocate for. */ - void incReserve(unsigned extraPtCount); + void incReserve(int extraPtCount); /** Set the beginning of the next contour to the point (x,y). diff --git a/gfx/skia/skia/src/core/SkPath.cpp b/gfx/skia/skia/src/core/SkPath.cpp index 8f93c9c18..b7d392025 100644 --- a/gfx/skia/skia/src/core/SkPath.cpp +++ b/gfx/skia/skia/src/core/SkPath.cpp @@ -716,9 +716,11 @@ void SkPath::setConvexity(Convexity c) { fFirstDirection = SkPathPriv::kUnknown_FirstDirection; \ } while (0) -void SkPath::incReserve(U16CPU inc) { +void SkPath::incReserve(int inc) { SkDEBUGCODE(this->validate();) - SkPathRef::Editor(&fPathRef, inc, inc); + if (inc > 0) { + SkPathRef::Editor(&fPathRef, inc, inc); + } SkDEBUGCODE(this->validate();) } |