Revert "Revert "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap""
This reverts commit 809cbedd4b252be221b2ac3b4269d312fd8f53a0.
Bug: skia:
Change-Id: I680d8daeeeeb15526b44c1305d8fb0c6bfa38e1d
Reviewed-on: https://skia-review.googlesource.com/52665
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/src/codec/SkSampler.cpp b/src/codec/SkSampler.cpp
index c7d9a3a..d18410b 100644
--- a/src/codec/SkSampler.cpp
+++ b/src/codec/SkSampler.cpp
@@ -14,8 +14,8 @@
uint64_t colorOrIndex, SkCodec::ZeroInitialized zeroInit) {
SkASSERT(dst != nullptr);
- // Calculate bytes to fill. We use getSafeSize since the last row may not be padded.
- const size_t bytesToFill = info.getSafeSize(rowBytes);
+ // Calculate bytes to fill.
+ const size_t bytesToFill = info.computeByteSize(rowBytes);
const int width = info.width();
const int numRows = info.height();