Index: src/images/SkImageDecoder_wbmp.cpp |
diff --git a/src/images/SkImageDecoder_wbmp.cpp b/src/images/SkImageDecoder_wbmp.cpp |
index 96677ccafc50f34f4e5c1e22b18fec5161f5afc5..0cce60ed6e2845442cc3d46311d4770fd57a0257 100644 |
--- a/src/images/SkImageDecoder_wbmp.cpp |
+++ b/src/images/SkImageDecoder_wbmp.cpp |
@@ -21,6 +21,8 @@ public: |
return kWBMP_Format; |
} |
+ virtual Format onGetFormat(SkStream*) const SK_OVERRIDE; |
+ |
protected: |
virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode) SK_OVERRIDE; |
@@ -155,6 +157,14 @@ bool SkWBMPImageDecoder::onDecode(SkStream* stream, SkBitmap* decodedBitmap, |
return true; |
} |
+SkImageDecoder::Format SkWBMPImageDecoder::onGetFormat(SkStream* stream) const { |
+ wbmp_head head; |
+ if (head.init(stream)) { |
+ return kWBMP_Format; |
+ } |
+ return kUnknown_Format; |
+} |
+ |
/////////////////////////////////////////////////////////////////////////////// |
DEFINE_DECODER_CREATOR(WBMPImageDecoder); |
/////////////////////////////////////////////////////////////////////////////// |