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

Side by Side Diff: src/images/SkImageDecoder_libico.cpp

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698