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

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, 1 month 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/images/SkForceLinking.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 4d4d2a83c0f18a0bd31a8d42bd64d947703a8126..f001c1c560797d32552a55558a7c595f0a5a1980 100644
--- a/include/core/SkImageEncoder.h
+++ b/include/core/SkImageEncoder.h
@@ -76,35 +76,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
« no previous file with comments | « include/core/SkImageDecoder.h ('k') | include/images/SkForceLinking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698