From 91903016bd260ffdb10d374900741ede33df2020 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 17 Feb 2019 21:31:54 +0100 Subject: Skia: Be consistent about int for incReserve. Upstream port. --- gfx/skia/skia/include/core/SkPath.h | 2 +- gfx/skia/skia/src/core/SkPath.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'gfx') 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();) } -- cgit v1.2.3