| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkTypes.h" | 9 #include "SkTypes.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #undef UINT8_MAX | 24 #undef UINT8_MAX |
| 25 #undef INT16_MAX | 25 #undef INT16_MAX |
| 26 #undef UINT16_MAX | 26 #undef UINT16_MAX |
| 27 #undef INT32_MAX | 27 #undef INT32_MAX |
| 28 #undef UINT32_MAX | 28 #undef UINT32_MAX |
| 29 #undef INT64_MAX | 29 #undef INT64_MAX |
| 30 #undef UINT64_MAX | 30 #undef UINT64_MAX |
| 31 | 31 |
| 32 #include <wincodec.h> | 32 #include <wincodec.h> |
| 33 #include "SkAutoCoInitialize.h" | 33 #include "SkAutoCoInitialize.h" |
| 34 #include "SkBitmap.h" |
| 34 #include "SkImageEncoder.h" | 35 #include "SkImageEncoder.h" |
| 35 #include "SkIStream.h" | 36 #include "SkIStream.h" |
| 36 #include "SkMovie.h" | |
| 37 #include "SkStream.h" | 37 #include "SkStream.h" |
| 38 #include "SkTScopedComPtr.h" | 38 #include "SkTScopedComPtr.h" |
| 39 #include "SkUnPreMultiply.h" | 39 #include "SkUnPreMultiply.h" |
| 40 | 40 |
| 41 //All Windows SDKs back to XPSP2 export the CLSID_WICImagingFactory symbol. | 41 //All Windows SDKs back to XPSP2 export the CLSID_WICImagingFactory symbol. |
| 42 //In the Windows8 SDK the CLSID_WICImagingFactory symbol is still exported | 42 //In the Windows8 SDK the CLSID_WICImagingFactory symbol is still exported |
| 43 //but CLSID_WICImagingFactory is then #defined to CLSID_WICImagingFactory2. | 43 //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 | 44 //Undo this #define if it has been done so that we link against the symbols |
| 45 //we intended to link against on all SDKs. | 45 //we intended to link against on all SDKs. |
| 46 #if defined(CLSID_WICImagingFactory) | 46 #if defined(CLSID_WICImagingFactory) |
| 47 #undef CLSID_WICImagingFactory | 47 #undef CLSID_WICImagingFactory |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 ///////////////////////////////////////////////////////////////////////// | |
| 51 | |
| 52 SkMovie* SkMovie::DecodeStream(SkStreamRewindable* stream) { | |
| 53 return nullptr; | |
| 54 } | |
| 55 | |
| 56 ///////////////////////////////////////////////////////////////////////// | |
| 57 | |
| 58 class SkImageEncoder_WIC : public SkImageEncoder { | 50 class SkImageEncoder_WIC : public SkImageEncoder { |
| 59 public: | 51 public: |
| 60 SkImageEncoder_WIC(Type t) : fType(t) {} | 52 SkImageEncoder_WIC(Type t) : fType(t) {} |
| 61 | 53 |
| 62 // DO NOT USE this constructor. This exists only so SkForceLinking can | 54 // DO NOT USE this constructor. This exists only so SkForceLinking can |
| 63 // link the WIC image encoder. | 55 // link the WIC image encoder. |
| 64 SkImageEncoder_WIC() {} | 56 SkImageEncoder_WIC() {} |
| 65 | 57 |
| 66 protected: | 58 protected: |
| 67 virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality); | 59 virtual bool onEncode(SkWStream* stream, const SkBitmap& bm, int quality); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 return nullptr; | 229 return nullptr; |
| 238 } | 230 } |
| 239 return new SkImageEncoder_WIC(t); | 231 return new SkImageEncoder_WIC(t); |
| 240 } | 232 } |
| 241 | 233 |
| 242 static SkImageEncoder_EncodeReg gEReg(sk_imageencoder_wic_factory); | 234 static SkImageEncoder_EncodeReg gEReg(sk_imageencoder_wic_factory); |
| 243 | 235 |
| 244 DEFINE_ENCODER_CREATOR(ImageEncoder_WIC); | 236 DEFINE_ENCODER_CREATOR(ImageEncoder_WIC); |
| 245 | 237 |
| 246 #endif // defined(SK_BUILD_FOR_WIN32) | 238 #endif // defined(SK_BUILD_FOR_WIN32) |
| OLD | NEW |