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

Unified Diff: tools/skimage_main.cpp

Issue 418363002: Fix assert in skimage test. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 100 chars per line. Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skimage_main.cpp
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp
index a488aa7e2f0bf25e6cf716ae8ff9b3c6eb92cf31..cd58eacd59fe68dda6c22c087f90d4aa5550ef6a 100644
--- a/tools/skimage_main.cpp
+++ b/tools/skimage_main.cpp
@@ -587,7 +587,8 @@ static void decodeFileAndWrite(const char srcPath[], const SkString* writePath)
// Build the tile index for decoding subsets. If the image is 1x1, skip subset
// decoding since there are no smaller subsets.
if (codec->buildTileIndex(&stream, &width, &height) && width > 1 && height > 1) {
- SkASSERT(bitmap.width() == width && bitmap.height() == height);
+ SkASSERT((bitmap.width() == width && bitmap.height() == height)
+ || FLAGS_sampleSize != 1);
// Call decodeSubset multiple times:
SkRandom rand(0);
for (int i = 0; i < 5; i++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698