diff options
author | reed <reed@google.com> | 2014-09-02 12:50:45 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-02 12:50:45 -0700 |
commit | 848250415eddc54075f7eb8795e8db79e749c6ab (patch) | |
tree | eb60aea6e61c9b3a9e195ab3cfb01d571351f78b /tests/DrawBitmapRectTest.cpp | |
parent | 00f30bdc9e34b013da54b4406f36556c5be8d041 (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.cpp | 4 |
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, |