aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DrawBitmapRectTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-09-02 12:50:45 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-09-02 12:50:45 -0700
commit848250415eddc54075f7eb8795e8db79e749c6ab (patch)
treeeb60aea6e61c9b3a9e195ab3cfb01d571351f78b /tests/DrawBitmapRectTest.cpp
parent00f30bdc9e34b013da54b4406f36556c5be8d041 (diff)
make allocPixels throw on failure
BUG=skia: R=mtklein@google.com, fmalita@google.com, fmalita@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/510423005
Diffstat (limited to 'tests/DrawBitmapRectTest.cpp')
-rw-r--r--tests/DrawBitmapRectTest.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index 6dca98b527..720155ca0c 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)) {
+ // allow this to fail silently, to test the code downstream
+ }
bm.eraseColor(SK_ColorRED);
matrix.setAll(0.0078740157f,