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

Unified 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: reed+scroggo 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/images/SkImageDecoder_libbmp.cpp ('k') | src/images/SkImageDecoder_libico.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libgif.cpp
diff --git a/src/images/SkImageDecoder_libgif.cpp b/src/images/SkImageDecoder_libgif.cpp
index d368eccd92d629537ae7b8cedf68b1dc29d81970..21d95aae00bc6d538bd055e175d58f76e65a6421 100644
--- a/src/images/SkImageDecoder_libgif.cpp
+++ b/src/images/SkImageDecoder_libgif.cpp
@@ -368,8 +368,6 @@ static bool is_gif(SkStream* stream) {
return false;
}
-#include "SkTRegistry.h"
-
static SkImageDecoder* sk_libgif_dfactory(SkStream* stream) {
if (is_gif(stream)) {
return SkNEW(SkGIFImageDecoder);
@@ -377,7 +375,7 @@ static SkImageDecoder* sk_libgif_dfactory(SkStream* stream) {
return NULL;
}
-static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_libgif_dfactory);
+static SkImageDecoder_DecodeReg gReg(sk_libgif_dfactory);
static SkImageDecoder::Format get_format_gif(SkStream* stream) {
if (is_gif(stream)) {
@@ -386,4 +384,4 @@ static SkImageDecoder::Format get_format_gif(SkStream* stream) {
return SkImageDecoder::kUnknown_Format;
}
-static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_gif);
+static SkImageDecoder_FormatReg gFormatReg(get_format_gif);
« no previous file with comments | « src/images/SkImageDecoder_libbmp.cpp ('k') | src/images/SkImageDecoder_libico.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698