Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(548)

Unified Diff: tests/DrawBitmapRectTest.cpp

Issue 510423005: make allocPixels throw on failure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: can't use (void) to suppress the "must check return result" Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/DrawBitmapRectTest.cpp
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 6dca98b527207a086178b07199d6cd839e8c6dc8..720155ca0c01a2f4d11443ac7f81a20b8197ed63 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -190,7 +190,9 @@ static void test_wacky_bitmapshader(skiatest::Reporter* reporter,
c.concat(matrix);
SkBitmap bm;
- bm.allocN32Pixels(width, height);
+ if (bm.tryAllocN32Pixels(width, height)) {
mtklein 2014/09/02 18:50:26 This one's pretty surprising. The test's exploitin
reed1 2014/09/02 19:35:28 The test explicitly passes in 0xFFFF x 0xFFFF for
+ // allow this to fail silently, to test the code downstream
+ }
bm.eraseColor(SK_ColorRED);
matrix.setAll(0.0078740157f,

Powered by Google App Engine
This is Rietveld 408576698