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 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // This macro defines the global creation entry point for each encoder. Each | 77 // This macro defines the global creation entry point for each encoder. Each |
78 // encoder implementation that registers with the encoder factory must call it. | 78 // encoder implementation that registers with the encoder factory must call it. |
79 #define DEFINE_ENCODER_CREATOR(codec) \ | 79 #define DEFINE_ENCODER_CREATOR(codec) \ |
80 SkImageEncoder *Create ## codec () { \ | 80 SkImageEncoder *Create ## codec () { \ |
81 return SkNEW( Sk ## codec ); \ | 81 return SkNEW( Sk ## codec ); \ |
82 } | 82 } |
83 | 83 |
84 // All the encoders known by Skia. Note that, depending on the compiler settings
, | 84 // All the encoders known by Skia. Note that, depending on the compiler settings
, |
85 // not all of these will be available | 85 // not all of these will be available |
| 86 /** An ARGBImageEncoder will always write out |
| 87 * bitmap.width() * bitmap.height() * 4 |
| 88 * bytes. |
| 89 */ |
| 90 DECLARE_ENCODER_CREATOR(ARGBImageEncoder); |
86 DECLARE_ENCODER_CREATOR(JPEGImageEncoder); | 91 DECLARE_ENCODER_CREATOR(JPEGImageEncoder); |
87 DECLARE_ENCODER_CREATOR(PNGImageEncoder); | 92 DECLARE_ENCODER_CREATOR(PNGImageEncoder); |
88 DECLARE_ENCODER_CREATOR(WEBPImageEncoder); | 93 DECLARE_ENCODER_CREATOR(WEBPImageEncoder); |
89 | 94 |
90 #endif | 95 #endif |
OLD | NEW |