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

Unified Diff: include/core/SkImageEncoder.h

Issue 670453002: Remove image decoder and encoder autoregistration (Closed) Base URL: https://skia.googlesource.com/skia.git@separate-image-decoder-01-skpicture
Patch Set: Created 6 years, 2 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
Index: include/core/SkImageEncoder.h
diff --git a/include/core/SkImageEncoder.h b/include/core/SkImageEncoder.h
index 0a850fcdcb47b545c5dbd28f66aaf6b06663c9c5..de7acf7918acf8e79462113dc036f132d05a8bee 100644
--- a/include/core/SkImageEncoder.h
+++ b/include/core/SkImageEncoder.h
@@ -87,35 +87,4 @@ protected:
virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality) = 0;
};
-// This macro declares a global (i.e., non-class owned) creation entry point
-// for each encoder (e.g., CreateJPEGImageEncoder)
-#define DECLARE_ENCODER_CREATOR(codec) \
- SkImageEncoder *Create ## codec ();
-
-// This macro defines the global creation entry point for each encoder. Each
-// encoder implementation that registers with the encoder factory must call it.
-#define DEFINE_ENCODER_CREATOR(codec) \
- SkImageEncoder *Create ## codec () { \
- return SkNEW( Sk ## codec ); \
- }
-
-// All the encoders known by Skia. Note that, depending on the compiler settings,
-// not all of these will be available
-/** An ARGBImageEncoder will always write out
- * bitmap.width() * bitmap.height() * 4
- * bytes.
- */
-DECLARE_ENCODER_CREATOR(ARGBImageEncoder);
-DECLARE_ENCODER_CREATOR(JPEGImageEncoder);
-DECLARE_ENCODER_CREATOR(PNGImageEncoder);
-DECLARE_ENCODER_CREATOR(KTXImageEncoder);
-DECLARE_ENCODER_CREATOR(WEBPImageEncoder);
-
-#ifdef SK_BUILD_FOR_IOS
-DECLARE_ENCODER_CREATOR(PNGImageEncoder_IOS);
-#endif
-
-// Typedef to make registering encoder callback easier
-// This has to be defined outside SkImageEncoder. :(
-typedef SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> SkImageEncoder_EncodeReg;
#endif

Powered by Google App Engine
This is Rietveld 408576698