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

Unified Diff: tests/ImageDecodingTest.cpp

Issue 147733004: Revert "SkBitmap now really stores SkImageInfo -- config is just a ruse" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 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 | « src/images/SkDecodingImageGenerator.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageDecodingTest.cpp
diff --git a/tests/ImageDecodingTest.cpp b/tests/ImageDecodingTest.cpp
index 2e0225a26195bdcaf1d39a9c143f6818ea53f349..81f900660d6d5b259fcf261ad8ffb4ca024efa6e 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));
« no previous file with comments | « src/images/SkDecodingImageGenerator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698