aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/WritePixelsTest.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/WritePixelsTest.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/WritePixelsTest.cpp')
-rw-r--r--tests/WritePixelsTest.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 2a8d0592bb..f47c67bd3b 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -115,8 +115,7 @@ static uint32_t getBitmapColor(int x, int y, int w, SkColorType ct, SkAlphaType
static void fillCanvas(SkCanvas* canvas) {
SkBitmap bmp;
if (bmp.isNull()) {
- SkDEBUGCODE(bool alloc = ) bmp.allocN32Pixels(DEV_W, DEV_H);
- SkASSERT(alloc);
+ bmp.allocN32Pixels(DEV_W, DEV_H);
for (int y = 0; y < DEV_H; ++y) {
for (int x = 0; x < DEV_W; ++x) {
*bmp.getAddr32(x, y) = getCanvasColor(x, y);