Index: include/core/SkImageDecoder.h |
diff --git a/include/core/SkImageDecoder.h b/include/core/SkImageDecoder.h |
index 7bdaaa8eb5f072b26eb7faf63d32fe493b5ff926..a8cbe6341332e4efcffe751589736c7b67d01758 100644 |
--- a/include/core/SkImageDecoder.h |
+++ b/include/core/SkImageDecoder.h |
@@ -15,6 +15,7 @@ |
#include "SkImage.h" |
#include "SkRect.h" |
#include "SkRefCnt.h" |
+#include "SkTRegistry.h" |
#include "SkTypes.h" |
class SkStream; |
@@ -557,4 +558,10 @@ DECLARE_DECODER_CREATOR(PNGImageDecoder); |
DECLARE_DECODER_CREATOR(WBMPImageDecoder); |
DECLARE_DECODER_CREATOR(WEBPImageDecoder); |
+ |
+// Typedefs to make registering decoder and formatter callbacks easier. |
+// These have to be defined outside SkImageDecoder. :( |
+typedef SkTRegistry<SkImageDecoder*(*)(SkStream*)> SkImageDecoder_DecodeReg; |
+typedef SkTRegistry<SkImageDecoder::Format(*)(SkStream*)> SkImageDecoder_FormatReg; |
+ |
#endif |