Watch out for SkFixed overflow in SkMipMap.cpp.
Tested with -fsanitize=signed-integer-overflow.
This new assert used to trigger in MipMap unit test.
Don't appear to be any GM diffs.
BUG=skia:
Review URL: https://codereview.chromium.org/729373004
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 0e9e230..a38be84 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -352,6 +352,7 @@
}
static inline int32_t SkAbs32(int32_t value) {
+ SkASSERT(value != SK_NaN32); // The most negative int32_t can't be negated.
if (value < 0) {
value = -value;
}