Index: src/codec/SkCodec.cpp |
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp |
index 87a7ded7dd6bd2e0c0a6da19de1d9782a50553c3..075500b8cf86d212aeee6f2851a7e6bdb7278706 100644 |
--- a/src/codec/SkCodec.cpp |
+++ b/src/codec/SkCodec.cpp |
@@ -18,6 +18,7 @@ |
#endif |
#include "SkStream.h" |
#include "SkWebpCodec.h" |
+#include "SkRawCodec.h" |
struct DecoderProc { |
bool (*IsFormat)(const void*, size_t); |
@@ -85,6 +86,9 @@ SkCodec* SkCodec::NewFromStream(SkStream* stream, |
break; |
} |
} |
+ |
+ // Try to treat the input as RAW. |
+ codec.reset(SkRawCodec::NewFromStream(streamDeleter.detach())); |
scroggo
2016/01/06 22:30:20
I think you need to first check that codec is NULL
yujieqin
2016/01/07 09:22:25
Oh, you are right!
|
} |
// Set the max size at 128 megapixels (512 MB for kN32). |