Index: ui/gfx/image/mojo/image_skia.mojom |
diff --git a/ui/gfx/image/mojo/image_skia.mojom b/ui/gfx/image/mojo/image_skia.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d883a51c183a5c38c118fd23685ca95699b6c14c |
--- /dev/null |
+++ b/ui/gfx/image/mojo/image_skia.mojom |
@@ -0,0 +1,24 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+module gfx.mojom; |
+ |
+// Mojo transport for ImageSkiaRep via shared buffer. |
+struct ImageSkiaRep { |
+ // Shared buffer handle to holds a serialized SkBitmap. |
+ handle<shared_buffer> shared_buffer_handle; |
+ |
+ // Byte size of the shared buffer. |
+ uint64 buffer_byte_size; |
+ |
+ // Corresponding scale of the bitmap. |
msw
2017/03/23 20:47:53
nit: "or 0 if unscaled"? Maybe explain what that m
xiyuan
2017/03/24 05:45:31
Done.
|
+ float scale; |
+}; |
+ |
+// Mojo transport for existing representations of an ImageSkia via shared |
+// buffer. Note it is caller's responsibility to ensure the ImageSkia contains |
+// all needed representations. |
+struct ImageSkia { |
+ array<ImageSkiaRep> image_reps; |
+}; |