aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPixmap.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-09-26 20:07:58 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-26 20:08:07 +0000
commitf46633f8af5296341e33ec4cdb69c71dfa997396 (patch)
treed6d59760f023f6855d921253d684716ae93bdc28 /include/core/SkPixmap.h
parent58e23039bd4a8aee2c67fa6c9e5105b925d2e561 (diff)
Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 98a6216b18b57c2f7a0d58f542c60503686aed69. Reason for revert: breaking the chrome roll. Looks like they may be writing data to create an image across all the row bytes and thus writing to unalloced data on the last row. Link to example failing bot: https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/539960 Original change's description: > guard old apis for querying byte-size of a bitmap/imageinfo/pixmap > > Previously we had size_t and uint64_t variations. > > The new (simpler) API always.. > - returns size_t, or 0 if the calculation overflowed > - returns the trimmed size (does not include rowBytes padding for the last row) > > Bug: skia: > Change-Id: I05173e877918327c7b207d2f7f1ab0db36892e2e > Reviewed-on: https://skia-review.googlesource.com/50980 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Florin Malita <fmalita@chromium.org> > Reviewed-by: Leon Scroggins <scroggo@google.com> TBR=mtklein@google.com,herb@google.com,scroggo@google.com,fmalita@chromium.org,reed@google.com Change-Id: I726f6ab1b36b14979ba6f37105e0a469b3f0dbc0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/51262 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/core/SkPixmap.h')
-rw-r--r--include/core/SkPixmap.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index f304bde933..aa43b3441f 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -206,7 +206,6 @@ public:
*/
int shiftPerPixel() const { return fInfo.shiftPerPixel(); }
-#ifdef SK_SUPPORT_LEGACY_SAFESIZE64
/** Returns conservative memory required for pixel storage.
Includes unused memory on last row when rowBytesAsPixels() exceeds width().
@@ -229,13 +228,6 @@ public:
@return exact pixel storage size if size fits in signed 32 bits
*/
size_t getSafeSize() const { return fInfo.getSafeSize(fRowBytes); }
-#endif
-
- /**
- * Returns the size (in bytes) of the pixmap's image buffer.
- * If the calculation overflows, or if the height is 0, this returns 0.
- */
- size_t computeByteSize() const { return fInfo.computeByteSize(fRowBytes); }
/** Returns true if all pixels are opaque. SkColorType determines how pixels
are encoded, and whether pixel describes alpha. Returns true for SkColorType