Index: src/codec/SkAndroidCodec.cpp |
diff --git a/src/codec/SkAndroidCodec.cpp b/src/codec/SkAndroidCodec.cpp |
index 6c3113ccfc53505c81231941891a4e79687fd9c0..7dfd64de75522a3377bac1f87ceb82c61f1feb12 100644 |
--- a/src/codec/SkAndroidCodec.cpp |
+++ b/src/codec/SkAndroidCodec.cpp |
@@ -8,9 +8,7 @@ |
#include "SkAndroidCodec.h" |
#include "SkCodec.h" |
#include "SkCodecPriv.h" |
-#ifdef SK_CODEC_DECODES_RAW |
#include "SkRawAdapterCodec.h" |
-#endif |
#include "SkSampledCodec.h" |
#include "SkWebpAdapterCodec.h" |
@@ -31,15 +29,23 @@ SkAndroidCodec* SkAndroidCodec::NewFromStream(SkStream* stream, SkPngChunkReader |
} |
switch (codec->getEncodedFormat()) { |
- case kWEBP_SkEncodedFormat: |
- return new SkWebpAdapterCodec((SkWebpCodec*) codec.detach()); |
+#ifdef SK_CODEC_DECODES_PNG |
case kPNG_SkEncodedFormat: |
+ case kICO_SkEncodedFormat: |
+#endif |
+#ifdef SK_CODEC_DECODES_JPEG |
case kJPEG_SkEncodedFormat: |
- case kWBMP_SkEncodedFormat: |
- case kBMP_SkEncodedFormat: |
+#endif |
+#ifdef SK_CODEC_DECODES_GIF |
case kGIF_SkEncodedFormat: |
- case kICO_SkEncodedFormat: |
+#endif |
+ case kBMP_SkEncodedFormat: |
+ case kWBMP_SkEncodedFormat: |
return new SkSampledCodec(codec.detach()); |
+#ifdef SK_CODEC_DECODES_WEBP |
+ case kWEBP_SkEncodedFormat: |
+ return new SkWebpAdapterCodec((SkWebpCodec*) codec.detach()); |
+#endif |
#ifdef SK_CODEC_DECODES_RAW |
case kRAW_SkEncodedFormat: |
return new SkRawAdapterCodec((SkRawCodec*)codec.detach()); |