From cd284c532376d16fcc4ed75baf3da65c3e4a2e95 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 29 Sep 2017 15:22:56 -0400 Subject: 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 Reviewed-by: Florin Malita --- tests/CodecTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/CodecTest.cpp') diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp index 8ea3193a4b..91b07ef49e 100644 --- a/tests/CodecTest.cpp +++ b/tests/CodecTest.cpp @@ -584,7 +584,7 @@ static void test_dimensions(skiatest::Reporter* r, const char path[]) { // Set up for the decode size_t rowBytes = scaledDims.width() * sizeof(SkPMColor); - size_t totalBytes = scaledInfo.getSafeSize(rowBytes); + size_t totalBytes = scaledInfo.computeByteSize(rowBytes); SkAutoTMalloc pixels(totalBytes); SkAndroidCodec::AndroidOptions options; @@ -1011,7 +1011,7 @@ static void check_color_xform(skiatest::Reporter* r, const char* path) { .makeColorSpace(colorSpace); size_t rowBytes = dstInfo.minRowBytes(); - SkAutoMalloc pixelStorage(dstInfo.getSafeSize(rowBytes)); + SkAutoMalloc pixelStorage(dstInfo.computeByteSize(rowBytes)); SkCodec::Result result = codec->getAndroidPixels(dstInfo, pixelStorage.get(), rowBytes, &opts); REPORTER_ASSERT(r, SkCodec::kSuccess == result); } -- cgit v1.2.3