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

Unified Diff: tests/WritePixelsTest.cpp

Issue 510423005: make allocPixels throw on failure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase 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
« no previous file with comments | « tests/TextureCompressionTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/WritePixelsTest.cpp
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 2a8d0592bbb558178323617695972cbb8d9b2de4..f47c67bd3b8b0be07370209c15fd12cb0f8843ae 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);
« no previous file with comments | « tests/TextureCompressionTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698