| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 4 * | 3 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 #include "SkTypes.h" | 8 #include "SkTypes.h" |
| 10 | 9 |
| 11 #if defined(SK_BUILD_FOR_WIN32) | 10 #if defined(SK_BUILD_FOR_WIN32) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 //but CLSID_WICImagingFactory is then #defined to CLSID_WICImagingFactory2. | 42 //but CLSID_WICImagingFactory is then #defined to CLSID_WICImagingFactory2. |
| 44 //Undo this #define if it has been done so that we link against the symbols | 43 //Undo this #define if it has been done so that we link against the symbols |
| 45 //we intended to link against on all SDKs. | 44 //we intended to link against on all SDKs. |
| 46 #if defined(CLSID_WICImagingFactory) | 45 #if defined(CLSID_WICImagingFactory) |
| 47 #undef CLSID_WICImagingFactory | 46 #undef CLSID_WICImagingFactory |
| 48 #endif | 47 #endif |
| 49 | 48 |
| 50 class SkImageEncoder_WIC : public SkImageEncoder { | 49 class SkImageEncoder_WIC : public SkImageEncoder { |
| 51 public: | 50 public: |
| 52 SkImageEncoder_WIC(Type t) : fType(t) {} | 51 SkImageEncoder_WIC(Type t) : fType(t) {} |
| 53 | 52 |
| 54 // DO NOT USE this constructor. This exists only so SkForceLinking can | 53 // DO NOT USE this constructor. This exists only so SkForceLinking can |
| 55 // link the WIC image encoder. | 54 // link the WIC image encoder. |
| 56 SkImageEncoder_WIC() {} | 55 SkImageEncoder_WIC() {} |
| 57 | 56 |
| 58 protected: | 57 protected: |
| 59 virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality); | 58 virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality); |
| 60 | 59 |
| 61 private: | 60 private: |
| 62 Type fType; | 61 Type fType; |
| 63 }; | 62 }; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 return nullptr; | 228 return nullptr; |
| 230 } | 229 } |
| 231 return new SkImageEncoder_WIC(t); | 230 return new SkImageEncoder_WIC(t); |
| 232 } | 231 } |
| 233 | 232 |
| 234 static SkImageEncoder_EncodeReg gEReg(sk_imageencoder_wic_factory); | 233 static SkImageEncoder_EncodeReg gEReg(sk_imageencoder_wic_factory); |
| 235 | 234 |
| 236 DEFINE_ENCODER_CREATOR(ImageEncoder_WIC); | 235 DEFINE_ENCODER_CREATOR(ImageEncoder_WIC); |
| 237 | 236 |
| 238 #endif // defined(SK_BUILD_FOR_WIN32) | 237 #endif // defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |