aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkPath.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-09 15:11:08 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-09 21:41:58 +0000
commit405b9d23f80c764553fb512f57ce45eef3129c8d (patch)
tree33128c14c4b43add7e95b5d54354c22e2dd33ebe /src/core/SkPath.cpp
parentedef8ec4b24f9d2ce76e4c53304e25853888bee4 (diff)
detect bad conic weights
Bug: skia:7478 Change-Id: I5fb254e10f3f38184fe41eb01e543f04b1a03081 Reviewed-on: https://skia-review.googlesource.com/92641 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkPath.cpp')
-rw-r--r--src/core/SkPath.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp
index ff0152bb4a..fe557d0fe9 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -2214,7 +2214,7 @@ size_t SkPath::readFromMemory(const void* storage, size_t length) {
#include "SkStream.h"
static void append_params(SkString* str, const char label[], const SkPoint pts[],
- int count, SkScalarAsStringType strType, SkScalar conicWeight = -1) {
+ int count, SkScalarAsStringType strType, SkScalar conicWeight = -12345) {
str->append(label);
str->append("(");
@@ -2227,7 +2227,7 @@ static void append_params(SkString* str, const char label[], const SkPoint pts[]
str->append(", ");
}
}
- if (conicWeight >= 0) {
+ if (conicWeight != -12345) {
str->append(", ");
SkAppendScalar(str, conicWeight, strType);
}