| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 3 * | 3 * |
| 4 * 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 |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkImageEncoder_DEFINED | 8 #ifndef SkImageEncoder_DEFINED |
| 9 #define SkImageEncoder_DEFINED | 9 #define SkImageEncoder_DEFINED |
| 10 | 10 |
| 11 #include "SkImageInfo.h" | 11 #include "SkImageInfo.h" |
| 12 #include "SkTRegistry.h" | 12 #include "SkTRegistry.h" |
| 13 | 13 |
| 14 class SkBitmap; | 14 class SkBitmap; |
| 15 class SkData; | 15 class SkData; |
| 16 class SkWStream; | 16 class SkWStream; |
| 17 | 17 |
| 18 class SkImageEncoder { | 18 class SkImageEncoder { |
| 19 public: | 19 public: |
| 20 // TODO (scroggo): Merge with SkEncodedFormat. |
| 20 enum Type { | 21 enum Type { |
| 21 kUnknown_Type, | 22 kUnknown_Type, |
| 22 kBMP_Type, | 23 kBMP_Type, |
| 23 kGIF_Type, | 24 kGIF_Type, |
| 24 kICO_Type, | 25 kICO_Type, |
| 25 kJPEG_Type, | 26 kJPEG_Type, |
| 26 kPNG_Type, | 27 kPNG_Type, |
| 27 kWBMP_Type, | 28 kWBMP_Type, |
| 28 kWEBP_Type, | 29 kWEBP_Type, |
| 29 kKTX_Type, | 30 kKTX_Type, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 DECLARE_ENCODER_CREATOR(WEBPImageEncoder); | 105 DECLARE_ENCODER_CREATOR(WEBPImageEncoder); |
| 105 | 106 |
| 106 #ifdef SK_BUILD_FOR_IOS | 107 #ifdef SK_BUILD_FOR_IOS |
| 107 DECLARE_ENCODER_CREATOR(PNGImageEncoder_IOS); | 108 DECLARE_ENCODER_CREATOR(PNGImageEncoder_IOS); |
| 108 #endif | 109 #endif |
| 109 | 110 |
| 110 // Typedef to make registering encoder callback easier | 111 // Typedef to make registering encoder callback easier |
| 111 // This has to be defined outside SkImageEncoder. :( | 112 // This has to be defined outside SkImageEncoder. :( |
| 112 typedef SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> SkImageEncoder_Enc
odeReg; | 113 typedef SkTRegistry<SkImageEncoder*(*)(SkImageEncoder::Type)> SkImageEncoder_Enc
odeReg; |
| 113 #endif | 114 #endif |
| OLD | NEW |