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

Unified Diff: src/codec/SkAndroidCodec.cpp

Issue 1702533004: Individually enable and disable SkCodecs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « public.bzl ('k') | src/codec/SkCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « public.bzl ('k') | src/codec/SkCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698