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

Unified Diff: src/images/SkImageEncoder_Factory.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_wbmp.cpp ('k') | src/images/SkMovie_gif.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageEncoder_Factory.cpp
diff --git a/src/images/SkImageEncoder_Factory.cpp b/src/images/SkImageEncoder_Factory.cpp
index 10f8d64decffaa6bad6af71bd6d6fa4ba697e162..2931d12eae7c42042c53b8f22a83aaae2bc7094a 100644
--- a/src/images/SkImageEncoder_Factory.cpp
+++ b/src/images/SkImageEncoder_Factory.cpp
@@ -6,18 +6,13 @@
* found in the LICENSE file.
*/
-
#include "SkImageEncoder.h"
-#include "SkTRegistry.h"
-
-typedef SkTRegistry<SkImageEncoder*, SkImageEncoder::Type> EncodeReg;
-// Can't use the typedef here because of complex C++ corner cases
-template EncodeReg* SkTRegistry<SkImageEncoder*, SkImageEncoder::Type>::gHead;
+template SkImageEncoder_EncodeReg* SkImageEncoder_EncodeReg::gHead;
SkImageEncoder* SkImageEncoder::Create(Type t) {
SkImageEncoder* codec = NULL;
- const EncodeReg* curr = EncodeReg::Head();
+ const SkImageEncoder_EncodeReg* curr = SkImageEncoder_EncodeReg::Head();
while (curr) {
if ((codec = curr->factory()(t)) != NULL) {
return codec;
« no previous file with comments | « src/images/SkImageDecoder_wbmp.cpp ('k') | src/images/SkMovie_gif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698