Index: src/images/SkDecodingImageGenerator.cpp |
diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp |
index 1e2813660329ad29821704cadf79916df0aab153..153d1e220bc6be643dea492e8c4d74192872268c 100644 |
--- a/src/images/SkDecodingImageGenerator.cpp |
+++ b/src/images/SkDecodingImageGenerator.cpp |
@@ -275,6 +275,11 @@ SkImageGenerator* SkDecodingImageGenerator::Create( |
info.fHeight = bitmap.height(); |
info.fColorType = opts.fRequestedColorType; |
info.fAlphaType = bitmap.alphaType(); |
+ |
+ // Sanity check. |
+ SkDEBUGCODE(SkColorType tmp;) |
+ SkASSERT(SkBitmapConfigToColorType(config, &tmp)); |
+ SkASSERT(tmp == opts.fRequestedColorType); |
} |
return SkNEW_ARGS(SkDecodingImageGenerator, |
(data, autoStream.detach(), info, |