aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2014-07-25 10:26:32 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-07-25 10:26:32 -0700
commit75e62ea9d6d99ff06133d95c3451b698dff52a55 (patch)
tree137ba20c97b8c31cc13a7ea597a70cbee3111ee6 /tools
parent4881a4d932832c407cc6624460415f624836d7d8 (diff)
Fix assert in skimage test.
The width and height may not match expected width and height when sampleSize is not 1. R=djsollen@google.com Author: scroggo@google.com Review URL: https://codereview.chromium.org/418363002
Diffstat (limited to 'tools')
-rw-r--r--tools/skimage_main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp
index a488aa7e2f..cd58eacd59 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++) {