Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1044)

Unified Diff: webkit/support/webkit_support_gfx.h

Issue 8226018: Extract an independent webkit_support_gfx target. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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,

Powered by Google App Engine
This is Rietveld 408576698