Chromium Code Reviews| Index: webkit/support/webkit_support_gfx.h |
| diff --git a/webkit/support/webkit_support_gfx.h b/webkit/support/webkit_support_gfx.h |
| index d832fcc99db278b94946818604287753292d096d..9cfbe46bc34c5f91f556329ab33da4a306baf3a0 100644 |
| --- a/webkit/support/webkit_support_gfx.h |
| +++ b/webkit/support/webkit_support_gfx.h |
| @@ -14,6 +14,32 @@ |
| namespace webkit_support { |
| +enum ColorFormat { |
|
tony
2011/10/12 16:50:48
Can we move this to the .cc file and put it in an
HaoZheng
2011/10/13 03:16:02
Done.
|
| + // 3 bytes per pixel (packed), in RGB order regardless of endianness. |
| + // This is the native JPEG format. |
| + FORMAT_RGB, |
| + |
| + // 4 bytes per pixel, in RGBA order in memory regardless of endianness. |
| + FORMAT_RGBA, |
| + |
| + // 4 bytes per pixel, in BGRA order in memory regardless of endianness. |
| + // This is the default Windows DIB order. |
| + FORMAT_BGRA, |
| + |
| + // 4 bytes per pixel, in pre-multiplied kARGB_8888_Config format. For use |
| + // with directly writing to a skia bitmap. |
| + FORMAT_SkBitmap |
| +}; |
| + |
| +// Represents a comment in the tEXt ancillary chunk of the png. |
| +struct Comment { |
|
tony
2011/10/12 16:50:48
This too.
HaoZheng
2011/10/13 03:16:02
Done.
|
| + Comment(const std::string& k, const std::string& t); |
| + ~Comment(); |
| + |
| + std::string key; |
| + std::string text; |
| +}; |
| + |
| // Decode a PNG into an RGBA pixel array. |
| bool DecodePNG(const unsigned char* input, size_t input_size, |
| std::vector<unsigned char>* output, |