Rewrite SkTRegistry to take any trivially-copyable type.

Obviously these are all currently function pointers of type T(*)(P) for various
T and P.  In bench refactoring, I'm trying to register a function pointer of
type T(*)(), which can't be done as is (passing P=void doesn't work).  This
also lets us register things like primitives, which is conceivable useful.

BUG=
R=reed@google.com, scroggo@google.com

Review URL: https://codereview.chromium.org/23453031

git-svn-id: http://skia.googlecode.com/svn/trunk@11082 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp
index 47fa729..c0f0f91 100644
--- a/src/images/SkImageDecoder_libico.cpp
+++ b/src/images/SkImageDecoder_libico.cpp
@@ -398,8 +398,6 @@
     return true;
 }
 
-#include "SkTRegistry.h"
-
 static SkImageDecoder* sk_libico_dfactory(SkStream* stream) {
     if (is_ico(stream)) {
         return SkNEW(SkICOImageDecoder);
@@ -407,7 +405,7 @@
     return NULL;
 }
 
-static SkTRegistry<SkImageDecoder*, SkStream*> gReg(sk_libico_dfactory);
+static SkImageDecoder_DecodeReg gReg(sk_libico_dfactory);
 
 static SkImageDecoder::Format get_format_ico(SkStream* stream) {
     if (is_ico(stream)) {
@@ -416,4 +414,4 @@
     return SkImageDecoder::kUnknown_Format;
 }
 
-static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_ico);
+static SkImageDecoder_FormatReg gFormatReg(get_format_ico);