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 |