Index: src/codec/SkCodec.cpp |
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp |
index 87a7ded7dd6bd2e0c0a6da19de1d9782a50553c3..550fcc6a8e73fa1363f307295e1024d77a2f1ea0 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); |
@@ -47,6 +48,7 @@ SkCodec* SkCodec::NewFromStream(SkStream* stream, |
SkAutoTDelete<SkStream> streamDeleter(stream); |
+ |
scroggo
2015/12/18 15:56:26
nit: extra blank line.
yujieqin
2016/01/06 18:47:19
Done.
|
// 14 is enough to read all of the supported types. |
const size_t bytesToRead = 14; |
SkASSERT(bytesToRead <= MinBufferedBytesNeeded()); |
@@ -85,6 +87,11 @@ SkCodec* SkCodec::NewFromStream(SkStream* stream, |
break; |
} |
} |
+ |
+ // Try read more for RAW cases. |
msarett
2015/12/18 16:26:12
Is there a reason that we can't add RAW to gDecode
scroggo
2015/12/18 16:47:05
SkRawCodec::IsRaw reads the whole stream, rather t
yujieqin
2016/01/06 18:47:19
As discussed in the buganizer, we don't need IsRaw
|
+ if (SkRawCodec::IsRaw(stream)) { |
+ codec.reset(SkRawCodec::NewFromStream(streamDeleter.detach())); |
+ } |
} |
// Set the max size at 128 megapixels (512 MB for kN32). |