Index: src/images/SkImageDecoder_wbmp.cpp |
diff --git a/src/images/SkImageDecoder_wbmp.cpp b/src/images/SkImageDecoder_wbmp.cpp |
index 96677ccafc50f34f4e5c1e22b18fec5161f5afc5..db40f595fa74433776784bf3182c454d76aca3a0 100644 |
--- a/src/images/SkImageDecoder_wbmp.cpp |
+++ b/src/images/SkImageDecoder_wbmp.cpp |
@@ -170,4 +170,13 @@ static SkImageDecoder* sk_wbmp_dfactory(SkStream* stream) { |
return NULL; |
} |
+static SkImageDecoder::Format get_format_wbmp(SkStream* stream) { |
+ wbmp_head head; |
+ if (head.init(stream)) { |
+ return SkImageDecoder::kWBMP_Format; |
+ } |
+ return SkImageDecoder::kUnknown_Format; |
+} |
+ |
static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_wbmp_dfactory); |
+static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_wbmp); |