OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkColorPriv.h" | 8 #include "SkColorPriv.h" |
9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
10 #include "SkStream.h" | 10 #include "SkStream.h" |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 400 |
401 #include "SkTRegistry.h" | 401 #include "SkTRegistry.h" |
402 | 402 |
403 static SkImageDecoder* sk_libico_dfactory(SkStream* stream) { | 403 static SkImageDecoder* sk_libico_dfactory(SkStream* stream) { |
404 if (is_ico(stream)) { | 404 if (is_ico(stream)) { |
405 return SkNEW(SkICOImageDecoder); | 405 return SkNEW(SkICOImageDecoder); |
406 } | 406 } |
407 return NULL; | 407 return NULL; |
408 } | 408 } |
409 | 409 |
410 static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_libico_dfactory); | 410 static SkTRegistry<SkImageDecoder*(*)(SkStream*)> gReg(sk_libico_dfactory); |
411 | 411 |
412 static SkImageDecoder::Format get_format_ico(SkStream* stream) { | 412 static SkImageDecoder::Format get_format_ico(SkStream* stream) { |
413 if (is_ico(stream)) { | 413 if (is_ico(stream)) { |
414 return SkImageDecoder::kICO_Format; | 414 return SkImageDecoder::kICO_Format; |
415 } | 415 } |
416 return SkImageDecoder::kUnknown_Format; | 416 return SkImageDecoder::kUnknown_Format; |
417 } | 417 } |
418 | 418 |
419 static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_ico)
; | 419 static SkTRegistry<SkImageDecoder::Format(*)(SkStream*)> gFormatReg(get_format_i
co); |
OLD | NEW |