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

Unified Diff: src/ports/SkImageEncoder_CG.cpp

Issue 2250683003: Add test for platform encoders, turn off platform encoders by default (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Test on windows Created 4 years, 4 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: src/ports/SkImageEncoder_CG.cpp
diff --git a/src/ports/SkImageEncoder_CG.cpp b/src/ports/SkImageEncoder_CG.cpp
index 5b217e62ec31424eccbd7e57c58726ccf3e0836f..789285626c05fe720f119236094adad1158faaa2 100644
--- a/src/ports/SkImageEncoder_CG.cpp
+++ b/src/ports/SkImageEncoder_CG.cpp
@@ -126,6 +126,7 @@ bool SkImageEncoder_CG::onEncode(SkWStream* stream, const SkBitmap& bm,
///////////////////////////////////////////////////////////////////////////////
+#ifdef SK_USE_CG_ENCODER
static SkImageEncoder* sk_imageencoder_cg_factory(SkImageEncoder::Type t) {
switch (t) {
case SkImageEncoder::kICO_Type:
@@ -141,14 +142,10 @@ static SkImageEncoder* sk_imageencoder_cg_factory(SkImageEncoder::Type t) {
}
static SkImageEncoder_EncodeReg gEReg(sk_imageencoder_cg_factory);
+#endif
-class SkPNGImageEncoder_CG : public SkImageEncoder_CG {
-public:
- SkPNGImageEncoder_CG()
- : SkImageEncoder_CG(kPNG_Type) {
- }
-};
-
-DEFINE_ENCODER_CREATOR(PNGImageEncoder_CG);
+SkImageEncoder* CreateImageEncoder_CG(SkImageEncoder::Type type) {
+ return new SkImageEncoder_CG(type);
+}
#endif//defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)

Powered by Google App Engine
This is Rietveld 408576698