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

Unified Diff: src/images/SkImageDecoder_libjpeg.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_libico.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libjpeg.cpp
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index 2bd48186ac5079431bd5c7832d40c99e6d884ee6..d50e4eb015689335b3910c97f58104bb41dc14c7 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -1136,8 +1136,6 @@ static bool is_jpeg(SkStream* stream) {
return true;
}
-#include "SkTRegistry.h"
-
static SkImageDecoder* sk_libjpeg_dfactory(SkStream* stream) {
if (is_jpeg(stream)) {
return SkNEW(SkJPEGImageDecoder);
@@ -1157,6 +1155,6 @@ static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) {
}
-static SkTRegistry<SkImageDecoder*, SkStream*> gDReg(sk_libjpeg_dfactory);
-static SkTRegistry<SkImageDecoder::Format, SkStream*> gFormatReg(get_format_jpeg);
-static SkTRegistry<SkImageEncoder*, SkImageEncoder::Type> gEReg(sk_libjpeg_efactory);
+static SkImageDecoder_DecodeReg gDReg(sk_libjpeg_dfactory);
+static SkImageDecoder_FormatReg gFormatReg(get_format_jpeg);
+static SkImageEncoder_EncodeReg gEReg(sk_libjpeg_efactory);
« no previous file with comments | « src/images/SkImageDecoder_libico.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698