Chromium Code Reviews| Index: src/codec/SkCodec.cpp |
| diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp |
| index 87a7ded7dd6bd2e0c0a6da19de1d9782a50553c3..f6d2da6e432b52b4de323d93e905cf83d8d981a2 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,14 @@ 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 (streamDeleter) { |
|
scroggo
2016/01/20 19:47:16
When you rebase, we have removed the variable "cod
yujieqin
2016/01/20 21:46:45
Sorry, as I am not really using git before, I have
yujieqin
2016/01/21 16:40:01
Thanks for the tips. I got the code rebase and fix
|
| + SkASSERT(!codec); |
| + codec.reset(SkRawCodec::NewFromStream(streamDeleter.detach())); |
| + } |
| +#endif |
| } |
| // Set the max size at 128 megapixels (512 MB for kN32). |