diff options
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 4 | ||||
-rw-r--r-- | dm/DMSrcSink.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
@@ -1128,9 +1128,9 @@ struct Task { SkBitmap swizzle; SkAssertResult(sk_tool_utils::copy_to(&swizzle, kRGBA_8888_SkColorType, bitmap)); - hash.write(swizzle.getPixels(), swizzle.computeByteSize()); + hash.write(swizzle.getPixels(), swizzle.getSize()); } else { - hash.write(bitmap.getPixels(), bitmap.computeByteSize()); + hash.write(bitmap.getPixels(), bitmap.getSize()); } } SkMD5::Digest digest; diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 0968aca705..2a0b59841c 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -454,7 +454,7 @@ Error CodecSrc::draw(SkCanvas* canvas) const { const int bpp = SkColorTypeBytesPerPixel(decodeInfo.colorType()); const size_t rowBytes = size.width() * bpp; - const size_t safeSize = decodeInfo.computeByteSize(rowBytes); + const size_t safeSize = decodeInfo.getSafeSize(rowBytes); SkAutoMalloc pixels(safeSize); SkCodec::Options options; @@ -1468,12 +1468,12 @@ static bool encode_png_base64(const SkBitmap& bitmap, SkString* dst) { static Error compare_bitmaps(const SkBitmap& reference, const SkBitmap& bitmap) { // The dimensions are a property of the Src only, and so should be identical. - SkASSERT(reference.computeByteSize() == bitmap.computeByteSize()); - if (reference.computeByteSize() != bitmap.computeByteSize()) { + SkASSERT(reference.getSize() == bitmap.getSize()); + if (reference.getSize() != bitmap.getSize()) { return "Dimensions don't match reference"; } // All SkBitmaps in DM are tight, so this comparison is easy. - if (0 != memcmp(reference.getPixels(), bitmap.getPixels(), reference.computeByteSize())) { + if (0 != memcmp(reference.getPixels(), bitmap.getPixels(), reference.getSize())) { SkString encoded; SkString errString("Pixels don't match reference"); if (encode_png_base64(reference, &encoded)) { |