Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: src/images/SkImageDecoder_wbmp.cpp

Issue 14363003: Updates to skimage tool to use it for testing. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: GetFormat -> GetStreamFormat Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/ports/SkImageDecoder_CG.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/images/SkImageDecoder_libwebp.cpp ('k') | src/ports/SkImageDecoder_CG.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698