aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/CodecTest.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-09-29 15:22:56 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-02 12:55:37 +0000
commitcd284c532376d16fcc4ed75baf3da65c3e4a2e95 (patch)
tree5c7e34122e72cef44f279b1aa32638d765d3c639 /tests/CodecTest.cpp
parent3c83668862521b3bbbd628a522c05688348d6e7f (diff)
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>
Diffstat (limited to 'tests/CodecTest.cpp')
-rw-r--r--tests/CodecTest.cpp4
1 files changed, 2 insertions, 2 deletions
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<SkPMColor> 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);
}