OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
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 #define WIN32_LEAN_AND_MEAN | 10 #define WIN32_LEAN_AND_MEAN |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 case SkImageEncoder::kICO_Type: | 425 case SkImageEncoder::kICO_Type: |
426 case SkImageEncoder::kJPEG_Type: | 426 case SkImageEncoder::kJPEG_Type: |
427 case SkImageEncoder::kPNG_Type: | 427 case SkImageEncoder::kPNG_Type: |
428 break; | 428 break; |
429 default: | 429 default: |
430 return NULL; | 430 return NULL; |
431 } | 431 } |
432 return SkNEW_ARGS(SkImageEncoder_WIC, (t)); | 432 return SkNEW_ARGS(SkImageEncoder_WIC, (t)); |
433 } | 433 } |
434 | 434 |
435 static SkTRegistry<SkImageEncoder*, SkImageEncoder::Type> gEReg(sk_imageencoder_
wic_factory); | 435 static SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> gEReg(sk_imageencod
er_wic_factory); |
436 | 436 |
437 static SkImageDecoder::Format get_format_wic(SkStream* stream) { | 437 static SkImageDecoder::Format get_format_wic(SkStream* stream) { |
438 SkImageDecoder::Format format; | 438 SkImageDecoder::Format format; |
439 SkImageDecoder_WIC codec; | 439 SkImageDecoder_WIC codec; |
440 if (!codec.decodeStream(stream, NULL, SkImageDecoder_WIC::kDecodeFormat_WICM
ode, &format)) { | 440 if (!codec.decodeStream(stream, NULL, SkImageDecoder_WIC::kDecodeFormat_WICM
ode, &format)) { |
441 format = SkImageDecoder::kUnknown_Format; | 441 format = SkImageDecoder::kUnknown_Format; |
442 } | 442 } |
443 return format; | 443 return format; |
444 } | 444 } |
445 | 445 |
446 static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_wic)
; | 446 static SkTRegistry<SkImageDecoder::Format(*)(SkStream*)> gFormatReg(get_format_w
ic); |
OLD | NEW |