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. |
+struct ImageSkiaRep { |
+ // Shared buffer handle to holds a serialized SkBitmap. |
+ handle<shared_buffer> shared_buffer_handle; |
+ |
+ // Byte size of the shared buffer. |
+ uint32 buffer_byte_size; |
Tom Sepez
2017/03/23 18:11:39
Could it be bigger than this on 64bit platforms?
D
xiyuan
2017/03/23 18:30:41
Maybe in the future. For now, I don't think we use
xiyuan
2017/03/23 19:45:23
Changed uint32 -> uint64 and added a DCHECK for hu
|
+ |
+ // Corresponding scale of the bitmap. |
+ float scale; |
Tom Sepez
2017/03/23 18:11:39
Can this be zero or negative?
xiyuan
2017/03/23 18:30:41
It should never be <= 0. I could add DCHECK in tra
xiyuan
2017/03/23 19:45:23
Actually, the scale can be 0 for an unscaled Image
|
+}; |
+ |
+// 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; |
+}; |