Chromium Code Reviews| Index: src/codec/SkCodec.cpp |
| diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp |
| index 87a7ded7dd6bd2e0c0a6da19de1d9782a50553c3..d51ba2a6d77472e3bf53af28c69060966ed92604 100644 |
| --- a/src/codec/SkCodec.cpp |
| +++ b/src/codec/SkCodec.cpp |
| @@ -16,6 +16,9 @@ |
| #if !defined(GOOGLE3) |
| #include "SkJpegCodec.h" |
| #endif |
| +#ifdef SK_CODEC_DECODES_RAW |
| +#include "SkRawCodec.h" |
| +#endif |
| #include "SkStream.h" |
| #include "SkWebpCodec.h" |
| @@ -85,6 +88,13 @@ SkCodec* SkCodec::NewFromStream(SkStream* stream, |
| break; |
| } |
| } |
| + |
| +#ifdef SK_CODEC_DECODES_RAW |
| + // Try to treat the input as RAW if all the other checks failed. |
| + if (!codec && streamDeleter) { |
|
scroggo
2016/01/14 15:26:38
As stated before, we should never have a codec if
yujieqin
2016/01/15 14:49:30
Done.
|
| + codec.reset(SkRawCodec::NewFromStream(streamDeleter.detach())); |
| + } |
| +#endif |
| } |
| // Set the max size at 128 megapixels (512 MB for kN32). |