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

Unified Diff: content/common/image_decoder.mojom

Issue 865543002: WIP: Browser image decoding using Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and add DecodeImageBase64. Created 5 years, 11 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
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_common_mojo_bindings.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/image_decoder.mojom
diff --git a/content/common/image_decoder.mojom b/content/common/image_decoder.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..e7f4f6d61213c230f32c9b842364003c99bf2b7e
--- /dev/null
+++ b/content/common/image_decoder.mojom
@@ -0,0 +1,31 @@
+module content;
+
+// These must match SkColorType
+//enum ColorType {
+//};
+
+// These must match SkAlphaType
+//enum AlphaType {
+//};
+
+struct ImageData {
+// ColorType color_type;
+// AlphaType alpha_type;
+ uint32 color_type;
+ uint32 alpha_type;
+
+ uint32 width;
+ uint32 height;
+
+ array<uint8> pixels;
+};
+
+interface ImageDecoder {
+ DecodeImage(array<uint8> encoded_data,
+ bool use_robust_jpeg,
+ bool shrink_to_fit)
+ => (bool success, ImageData? decoded_image);
+
+ DecodeImageBase64(string encoded_data)
+ => (bool success, ImageData? decoded_image);
+};
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_common_mojo_bindings.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698