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

Unified Diff: include/core/SkImageEncoder.h

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 | « include/core/SkImageDecoder.h ('k') | include/core/SkTRegistry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageEncoder.h
diff --git a/include/core/SkImageEncoder.h b/include/core/SkImageEncoder.h
index b990aff2a6ff4fb17898625d7cdfd01d8fce121c..5622eee7e0a20a192b0e40dd4871553cbd9ed842 100644
--- a/include/core/SkImageEncoder.h
+++ b/include/core/SkImageEncoder.h
@@ -9,6 +9,7 @@
#define SkImageEncoder_DEFINED
#include "SkTypes.h"
+#include "SkTRegistry.h"
class SkBitmap;
class SkData;
@@ -97,4 +98,7 @@ DECLARE_ENCODER_CREATOR(JPEGImageEncoder);
DECLARE_ENCODER_CREATOR(PNGImageEncoder);
DECLARE_ENCODER_CREATOR(WEBPImageEncoder);
+// Typedef to make registering encoder callback easier
+// This has to be defined outside SkImageEncoder. :(
+typedef SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> SkImageEncoder_EncodeReg;
#endif
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | include/core/SkTRegistry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698