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

Unified Diff: src/ports/SkImageEncoder_WIC.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
« no previous file with comments | « src/ports/SkImageEncoder_CG.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkImageEncoder_WIC.cpp
diff --git a/src/ports/SkImageEncoder_WIC.cpp b/src/ports/SkImageEncoder_WIC.cpp
index 9be95727cad2b0cd16d82da44ae46def4cbc6092..6524526bdbda52b3e1bf2a8059843d964e6bf03d 100644
--- a/src/ports/SkImageEncoder_WIC.cpp
+++ b/src/ports/SkImageEncoder_WIC.cpp
@@ -50,10 +50,6 @@ class SkImageEncoder_WIC : public SkImageEncoder {
public:
SkImageEncoder_WIC(Type t) : fType(t) {}
- // DO NOT USE this constructor. This exists only so SkForceLinking can
- // link the WIC image encoder.
- SkImageEncoder_WIC() {}
-
protected:
virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality);
@@ -67,12 +63,6 @@ bool SkImageEncoder_WIC::onEncode(SkWStream* stream
{
GUID type;
switch (fType) {
- case kBMP_Type:
msarett 2016/08/16 21:26:51 These don't work. I'm guessing that they've never
- type = GUID_ContainerFormatBmp;
- break;
- case kICO_Type:
- type = GUID_ContainerFormatIco;
- break;
case kJPEG_Type:
type = GUID_ContainerFormatJpeg;
break;
@@ -228,10 +218,9 @@ bool SkImageEncoder_WIC::onEncode(SkWStream* stream
///////////////////////////////////////////////////////////////////////////////
+#ifdef SK_USE_WIC_ENCODER
static SkImageEncoder* sk_imageencoder_wic_factory(SkImageEncoder::Type t) {
switch (t) {
- case SkImageEncoder::kBMP_Type:
- case SkImageEncoder::kICO_Type:
case SkImageEncoder::kPNG_Type:
case SkImageEncoder::kJPEG_Type:
break;
@@ -242,7 +231,10 @@ static SkImageEncoder* sk_imageencoder_wic_factory(SkImageEncoder::Type t) {
}
static SkImageEncoder_EncodeReg gEReg(sk_imageencoder_wic_factory);
+#endif
-DEFINE_ENCODER_CREATOR(ImageEncoder_WIC);
+SkImageEncoder* CreateImageEncoder_WIC(SkImageEncoder::Type type) {
+ return new SkImageEncoder_WIC(type);
+}
#endif // defined(SK_BUILD_FOR_WIN32)
« no previous file with comments | « src/ports/SkImageEncoder_CG.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698