From 384f0a7d6626026f21313e85e51890d747171ee8 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 6 Oct 2017 21:23:58 +0000 Subject: Revert "change computeByteSize to return max_size_t on overflow" This reverts commit 24295462722fd5a298d108a80b0aacbb0964da53. Reason for revert: broke running dm on google3 Original change's description: > change computeByteSize to return max_size_t on overflow > > Bug: skia:7132 > Change-Id: I41045640ee62b2c988a84370ead5034bbccc6daf > Reviewed-on: https://skia-review.googlesource.com/56620 > Reviewed-by: Ben Wagner > Commit-Queue: Mike Reed TBR=bungeman@google.com,herb@google.com,reed@google.com Change-Id: I5f58ec37241d2fae3ebdb7a3d6b41f9fd6d3c2ee No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7132 Reviewed-on: https://skia-review.googlesource.com/56880 Reviewed-by: Mike Reed Commit-Queue: Mike Reed --- include/core/SkImageInfo.h | 8 -------- include/core/SkTypes.h | 1 - 2 files changed, 9 deletions(-) (limited to 'include') diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h index cab84b9fe0..50d068a09c 100644 --- a/include/core/SkImageInfo.h +++ b/include/core/SkImageInfo.h @@ -317,19 +317,11 @@ public: } #endif -#ifdef SK_SUPPORT_LEGACY_COMPUTEBYTESIZE_RET_0 /** * Returns the size (in bytes) of the image buffer that this info needs, given the specified * rowBytes. The rowBytes must be >= this->minRowBytes(). * If the calculation overflows, or if the height is 0, this returns 0. */ -#else - /** - * Returns the size (in bytes) of the image buffer that this info needs, given the specified - * rowBytes. The rowBytes must be >= this->minRowBytes(). - * If the calculation overflows this returns SK_MaxSizeT - */ -#endif size_t computeByteSize(size_t rowBytes) const; /** diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 59bdaaa90c..63a2b40591 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -233,7 +233,6 @@ template D SkTo(S s) { #define SK_MaxU32 0xFFFFFFFF #define SK_MinU32 0 #define SK_NaN32 ((int) (1U << 31)) -#define SK_MaxSizeT SIZE_MAX static inline int32_t SkLeftShift(int32_t value, int32_t shift) { return (int32_t) ((uint32_t) value << shift); -- cgit v1.2.3