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/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 9912901..8ad177f 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -144,9 +144,10 @@
SkBitmap bm;
if (bm.tryAllocN32Pixels(width, height)) {
- // allow this to fail silently, to test the code downstream
+ bm.eraseColor(SK_ColorRED);
+ } else {
+ shouldBeDrawn = false;
}
- bm.eraseColor(SK_ColorRED);
matrix.setAll(0.0078740157f,
0,
@@ -179,7 +180,7 @@
* sign-extension bleed when packing the two values (X,Y) into our 32bit
* slot.
*
- * This tests exercises the original setup, plus 3 more to ensure that we can,
+ * This tests exercises the original setup, plus 2 more to ensure that we can,
* in fact, handle bitmaps at 64K-1 (assuming we don't exceed the total
* memory allocation limit).
*/
@@ -192,7 +193,6 @@
{ 0x1b294, 0x7f, false }, // crbug 118018 (width exceeds 64K)
{ 0xFFFF, 0x7f, true }, // should draw, test max width
{ 0x7f, 0xFFFF, true }, // should draw, test max height
- { 0xFFFF, 0xFFFF, false }, // allocation fails (too much RAM)
};
for (size_t i = 0; i < SK_ARRAY_COUNT(gTests); ++i) {