| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #include "SkImageDecoder.h" | 10 #include "SkImageDecoder.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 163 |
| 164 static SkImageDecoder* sk_wbmp_dfactory(SkStream* stream) { | 164 static SkImageDecoder* sk_wbmp_dfactory(SkStream* stream) { |
| 165 wbmp_head head; | 165 wbmp_head head; |
| 166 | 166 |
| 167 if (head.init(stream)) { | 167 if (head.init(stream)) { |
| 168 return SkNEW(SkWBMPImageDecoder); | 168 return SkNEW(SkWBMPImageDecoder); |
| 169 } | 169 } |
| 170 return NULL; | 170 return NULL; |
| 171 } | 171 } |
| 172 | 172 |
| 173 static SkImageDecoder::Format get_format_wbmp(SkStream* stream) { |
| 174 wbmp_head head; |
| 175 if (head.init(stream)) { |
| 176 return SkImageDecoder::kWBMP_Format; |
| 177 } |
| 178 return SkImageDecoder::kUnknown_Format; |
| 179 } |
| 180 |
| 173 static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_wbmp_dfactory); | 181 static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_wbmp_dfactory); |
| 182 static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_wbmp
); |
| OLD | NEW |