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

Unified Diff: tests/TextureCompressionTest.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/SkResourceCacheTest.cpp ('k') | tests/WritePixelsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TextureCompressionTest.cpp
diff --git a/tests/TextureCompressionTest.cpp b/tests/TextureCompressionTest.cpp
index da7a87bd41d36530e5b48283f2cd675a59f45e33..b93cabb4e0e0e0187ac1b9e6c7d8d9b41f5fbc91 100644
--- a/tests/TextureCompressionTest.cpp
+++ b/tests/TextureCompressionTest.cpp
@@ -58,8 +58,7 @@ DEF_TEST(CompressAlphaFailDimensions, reporter) {
bool setInfoSuccess = bitmap.setInfo(info);
REPORTER_ASSERT(reporter, setInfoSuccess);
- bool allocPixelsSuccess = bitmap.allocPixels(info);
- REPORTER_ASSERT(reporter, allocPixelsSuccess);
+ bitmap.allocPixels(info);
bitmap.unlockPixels();
for (int i = 0; i < SkTextureCompressor::kFormatCnt; ++i) {
@@ -92,8 +91,7 @@ DEF_TEST(CompressAlphaFailColorType, reporter) {
bool setInfoSuccess = bitmap.setInfo(info);
REPORTER_ASSERT(reporter, setInfoSuccess);
- bool allocPixelsSuccess = bitmap.allocPixels(info);
- REPORTER_ASSERT(reporter, allocPixelsSuccess);
+ bitmap.allocPixels(info);
bitmap.unlockPixels();
for (int i = 0; i < SkTextureCompressor::kFormatCnt; ++i) {
@@ -128,8 +126,7 @@ DEF_TEST(CompressCheckerboard, reporter) {
bool setInfoSuccess = bitmap.setInfo(info);
REPORTER_ASSERT(reporter, setInfoSuccess);
- bool allocPixelsSuccess = bitmap.allocPixels(info);
- REPORTER_ASSERT(reporter, allocPixelsSuccess);
+ bitmap.allocPixels(info);
bitmap.unlockPixels();
// Populate bitmap
@@ -215,8 +212,7 @@ DEF_TEST(CompressLATC, reporter) {
bool setInfoSuccess = bitmap.setInfo(info);
REPORTER_ASSERT(reporter, setInfoSuccess);
- bool allocPixelsSuccess = bitmap.allocPixels(info);
- REPORTER_ASSERT(reporter, allocPixelsSuccess);
+ bitmap.allocPixels(info);
bitmap.unlockPixels();
int latcDimX, latcDimY;
« no previous file with comments | « tests/SkResourceCacheTest.cpp ('k') | tests/WritePixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698