diff options
author | 2014-02-11 03:24:02 +0000 | |
---|---|---|
committer | 2014-02-11 03:24:02 +0000 | |
commit | 1195a28892d37ae9632e81e1bc2407cf644522d2 (patch) | |
tree | 7898adca3ed3c902becf9389214c4e80ccd9c95f /tests/ImageDecodingTest.cpp | |
parent | b53317c6fa0d7b2f86e9d069bb49dc157f04120a (diff) |
Revert "SkBitmap now really stores SkImageInfo -- config is just a ruse"
BUG=skia:
Review URL: https://codereview.chromium.org/147733004
git-svn-id: http://skia.googlecode.com/svn/trunk@13395 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/ImageDecodingTest.cpp')
-rw-r--r-- | tests/ImageDecodingTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp index 2e0225a261..81f900660d 100644 --- a/tests/ImageDecodingTest.cpp +++ b/tests/ImageDecodingTest.cpp @@ -333,7 +333,10 @@ static SkPixelRef* install_pixel_ref(SkBitmap* bitmap, SkASSERT(stream != NULL); SkASSERT(stream->rewind()); SkASSERT(stream->unique()); - SkColorType colorType = bitmap->colorType(); + SkColorType colorType; + if (!SkBitmapConfigToColorType(bitmap->config(), &colorType)) { + return NULL; + } SkDecodingImageGenerator::Options opts(sampleSize, ditherImage, colorType); SkAutoTDelete<SkImageGenerator> gen( SkDecodingImageGenerator::Create(stream, opts)); |