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

Side by Side Diff: src/images/SkImageDecoder_libgif.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 /* 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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 370
371 #include "SkTRegistry.h" 371 #include "SkTRegistry.h"
372 372
373 static SkImageDecoder* sk_libgif_dfactory(SkStream* stream) { 373 static SkImageDecoder* sk_libgif_dfactory(SkStream* stream) {
374 if (is_gif(stream)) { 374 if (is_gif(stream)) {
375 return SkNEW(SkGIFImageDecoder); 375 return SkNEW(SkGIFImageDecoder);
376 } 376 }
377 return NULL; 377 return NULL;
378 } 378 }
379 379
380 static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_libgif_dfactory); 380 static SkTRegistry<SkImageDecoder*(*)(SkStream*)> gReg(sk_libgif_dfactory);
381 381
382 static SkImageDecoder::Format get_format_gif(SkStream* stream) { 382 static SkImageDecoder::Format get_format_gif(SkStream* stream) {
383 if (is_gif(stream)) { 383 if (is_gif(stream)) {
384 return SkImageDecoder::kGIF_Format; 384 return SkImageDecoder::kGIF_Format;
385 } 385 }
386 return SkImageDecoder::kUnknown_Format; 386 return SkImageDecoder::kUnknown_Format;
387 } 387 }
388 388
389 static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_gif) ; 389 static SkTRegistry<SkImageDecoder::Format(*)(SkStream*)> gFormatReg(get_format_g if);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698