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

Unified Diff: ui/gfx/mojo/buffer_types.mojom

Issue 2298003002: gfx: Struct traits for GpuMemoryBufferHandle. (Closed)
Patch Set: . Created 4 years, 4 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: ui/gfx/mojo/buffer_types.mojom
diff --git a/ui/gfx/mojo/buffer_types.mojom b/ui/gfx/mojo/buffer_types.mojom
index 3a352df62957959989b1522a5631400398a48c48..c39cca128cde021eda29d92ee6170386b4f71c4b 100644
--- a/ui/gfx/mojo/buffer_types.mojom
+++ b/ui/gfx/mojo/buffer_types.mojom
@@ -49,3 +49,29 @@ enum GpuMemoryBufferType {
struct GpuMemoryBufferId {
int32 id;
};
+
+// gfx::NativePixmapPlane
+struct NativePixmapPlane {
+ int32 stride;
Tom Sepez 2016/08/31 16:52:36 Can these be negative? Would an unsigned type be
spang 2016/08/31 19:35:57 Please don't do that. https://engdoc.corp.google.
sadrul 2016/08/31 19:53:19 Doing this separately in https://codereview.chromi
rjkroege 2016/08/31 19:54:14 Also, I recall that for some overlay plane types,
+ int32 offset;
+ uint64 modifier;
+};
+
+// gfx::NativePixmapHandle
+struct NativePixmapHandle {
+ // A file descriptor for the underlying memory object (usually dmabuf).
+ array<handle> fds;
+
+ array<NativePixmapPlane> planes;
Tom Sepez 2016/08/31 17:04:15 Anyways, where do we check upon de-serialization t
sadrul 2016/08/31 17:13:19 It doesn't look like we actually check that anywhe
rjkroege 2016/08/31 19:54:14 On CrOS, these values end up here: https://cs.chro
sadrul 2016/08/31 20:01:28 |size| doesn't come at the same time as the stride
+};
+
+// gfx::GpuMemoryBufferHandle
+struct GpuMemoryBufferHandle {
+ GpuMemoryBufferType type;
+ GpuMemoryBufferId id;
+ handle shared_memory_handle;
+ uint32 offset;
+ int32 stride;
Tom Sepez 2016/08/31 16:52:36 nit: same here.
+ NativePixmapHandle? native_pixmap_handle;
+ // TODO: Add support for mach_port on mac.
+};

Powered by Google App Engine
This is Rietveld 408576698