Chromium Code Reviews| 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 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1196 if (is_png(stream)) { | 1196 if (is_png(stream)) { |
| 1197 return SkImageDecoder::kPNG_Format; | 1197 return SkImageDecoder::kPNG_Format; |
| 1198 } | 1198 } |
| 1199 return SkImageDecoder::kUnknown_Format; | 1199 return SkImageDecoder::kUnknown_Format; |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type t) { | 1202 SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type t) { |
| 1203 return (SkImageEncoder::kPNG_Type == t) ? SkNEW(SkPNGImageEncoder) : NULL; | 1203 return (SkImageEncoder::kPNG_Type == t) ? SkNEW(SkPNGImageEncoder) : NULL; |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 static SkTRegistry<SkImageEncoder*, SkImageEncoder::Type> gEReg(sk_libpng_efacto ry); | 1206 static SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> gEReg(sk_libpng_efa ctory); |
| 1207 static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_png) ; | 1207 static SkTRegistry<SkImageDecoder::Format(*)(SkStream*)> gFormatReg(get_format_p ng); |
|
reed1
2013/09/04 15:15:23
Seems like (perhaps) ImageDecoder should typedef t
scroggo
2013/09/04 15:40:21
That sounds reasonable to me.
| |
| 1208 static SkTRegistry<SkImageDecoder*, SkStream*> gDReg(sk_libpng_dfactory); | 1208 static SkTRegistry<SkImageDecoder*(*)(SkStream*)> gDReg(sk_libpng_dfactory); |
| OLD | NEW |