| 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 #ifndef SkImageEncoder_DEFINED | 8 #ifndef SkImageEncoder_DEFINED |
| 9 #define SkImageEncoder_DEFINED | 9 #define SkImageEncoder_DEFINED |
| 10 | 10 |
| 11 #include "SkTypes.h" | 11 #include "SkTypes.h" |
| 12 | 12 |
| 13 class SkBitmap; | 13 class SkBitmap; |
| 14 class SkWStream; | 14 class SkWStream; |
| 15 | 15 |
| 16 class SkImageEncoder { | 16 class SkImageEncoder { |
| 17 public: | 17 public: |
| 18 enum Type { | 18 enum Type { |
| 19 kUnknown_Type, |
| 19 kBMP_Type, | 20 kBMP_Type, |
| 20 kGIF_Type, | 21 kGIF_Type, |
| 21 kICO_Type, | 22 kICO_Type, |
| 22 kJPEG_Type, | 23 kJPEG_Type, |
| 23 kPNG_Type, | 24 kPNG_Type, |
| 24 kWBMP_Type, | 25 kWBMP_Type, |
| 25 kWEBP_Type, | 26 kWEBP_Type, |
| 26 }; | 27 }; |
| 27 static SkImageEncoder* Create(Type); | 28 static SkImageEncoder* Create(Type); |
| 28 | 29 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 return SkNEW( Sk ## codec ); \ | 82 return SkNEW( Sk ## codec ); \ |
| 82 } | 83 } |
| 83 | 84 |
| 84 // All the encoders known by Skia. Note that, depending on the compiler settings
, | 85 // All the encoders known by Skia. Note that, depending on the compiler settings
, |
| 85 // not all of these will be available | 86 // not all of these will be available |
| 86 DECLARE_ENCODER_CREATOR(JPEGImageEncoder); | 87 DECLARE_ENCODER_CREATOR(JPEGImageEncoder); |
| 87 DECLARE_ENCODER_CREATOR(PNGImageEncoder); | 88 DECLARE_ENCODER_CREATOR(PNGImageEncoder); |
| 88 DECLARE_ENCODER_CREATOR(WEBPImageEncoder); | 89 DECLARE_ENCODER_CREATOR(WEBPImageEncoder); |
| 89 | 90 |
| 90 #endif | 91 #endif |
| OLD | NEW |