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..c7e0f540be41e73c97894276903f33b5c0a76121 |
--- /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. |
msw
2017/03/23 20:47:51
I wonder if we should [add a todo/bug comment to]
xiyuan
2017/03/24 05:45:19
I think that would be helpful
- Modified the CL to
|
+struct ImageSkiaRep { |
+ // Shared buffer handle to holds a serialized SkBitmap. |
msw
2017/03/23 20:47:51
nit: "to hold" or "that holds"
xiyuan
2017/03/24 05:45:19
Done.
|
+ handle<shared_buffer> shared_buffer_handle; |
msw
2017/03/23 20:47:51
I'm not well versed with shared memory patterns (m
xiyuan
2017/03/24 05:45:19
Acknowledged. Will ask sadrul@ to take a look.
|
+ |
+ // Byte size of the shared buffer. |
+ uint32 buffer_byte_size; |
+ |
+ // Corresponding scale of the bitmap. |
+ float scale; |
+}; |
+ |
+// Mojo transport for existing representations of an ImageSkia via shared |
+// buffer. Note it is caller's responsibility to ensure the ImageSkia contains |
msw
2017/03/23 20:47:51
nit: "Note that it is the caller's"
xiyuan
2017/03/24 05:45:20
Update comment to reflect that we do MakeThreadSaf
|
+// all needed representations. |
+struct ImageSkia { |
+ array<ImageSkiaRep> image_reps; |
+}; |