diff options
author | caryclark <caryclark@google.com> | 2016-07-22 03:34:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-22 03:34:19 -0700 |
commit | cdeff81bdb2e5cde422b6850634c5d3977fcbae9 (patch) | |
tree | 19fff5f761df4b949c4d894c650674f5fab686c2 /src/pathops/SkPathOpsTypes.h | |
parent | 901257a3ba1d094280b4e1e0868bc0bcd137145a (diff) |
conic fuzz fix
If no closest section is found in conic intersection
(which can happen if the numbers are out of range)
abort the intersection.
Also suppress assert fired in this case so it only
checks intersections with in-range values.
TBR=reed@google.com
BUG=630378
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2166813006
Review-Url: https://codereview.chromium.org/2166813006
Diffstat (limited to 'src/pathops/SkPathOpsTypes.h')
-rw-r--r-- | src/pathops/SkPathOpsTypes.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pathops/SkPathOpsTypes.h b/src/pathops/SkPathOpsTypes.h index ad9c931795..3b98c7b3af 100644 --- a/src/pathops/SkPathOpsTypes.h +++ b/src/pathops/SkPathOpsTypes.h @@ -183,9 +183,14 @@ private: #endif }; +#ifdef SK_DEBUG #define SkOPASSERT(cond) SkASSERT(this->globalState()->debugSkipAssert() || cond) #define SkOPOBJASSERT(obj, cond) SkASSERT((obj->debugGlobalState() && \ obj->debugGlobalState()->debugSkipAssert()) || cond) +#else +#define SkOPASSERT(cond) +#define SkOPOBJASSERT(obj, cond) +#endif // Use Almost Equal when comparing coordinates. Use epsilon to compare T values. bool AlmostEqualUlps(float a, float b); |