Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd.
Bug: skia:
Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954
Reviewed-on: https://skia-review.googlesource.com/53900
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index 202df58..2fd987f 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -50,7 +50,7 @@
*requestedInfo = info;
}
const size_t rowBytes = info.minRowBytes();
- void* storage = sk_malloc_throw(info.getSafeSize(rowBytes));
+ void* storage = sk_malloc_throw(info.computeByteSize(rowBytes));
return SkSurface::MakeRasterDirectReleaseProc(info, storage, rowBytes,
release_direct_surface_storage,
storage);
@@ -565,7 +565,7 @@
// Try some illegal rowByte values
auto s = SkSurface::MakeRaster(info, 396, nullptr); // needs to be at least 400
REPORTER_ASSERT(reporter, nullptr == s);
- s = SkSurface::MakeRaster(info, 1 << 30, nullptr); // allocation to large
+ s = SkSurface::MakeRaster(info, std::numeric_limits<size_t>::max(), nullptr);
REPORTER_ASSERT(reporter, nullptr == s);
}