summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/software_generic/evas_native_common.h
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2016-05-17 13:42:32 -0500
committerDerek Foreman <derekf@osg.samsung.com>2016-05-18 11:52:24 -0500
commit72b1997f062e4749ea31515ae3c8253f79182838 (patch)
tree12eb5b4b040df602f5dda41ee20a8df6992c70bf /src/modules/evas/engines/software_generic/evas_native_common.h
parent0a6cdcc58c5751637e9075e469930d6f3c1d4421 (diff)
evas: Add wayland dmabuf native surface type
Add the structures required for supporting dmabuf native surfaces
Diffstat (limited to 'src/modules/evas/engines/software_generic/evas_native_common.h')
-rw-r--r--src/modules/evas/engines/software_generic/evas_native_common.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_native_common.h b/src/modules/evas/engines/software_generic/evas_native_common.h
index 0ea2b66862..3b51b1a1bc 100644
--- a/src/modules/evas/engines/software_generic/evas_native_common.h
+++ b/src/modules/evas/engines/software_generic/evas_native_common.h
@@ -29,6 +29,25 @@
29 29
30//#include <Evas_Common.h> 30//#include <Evas_Common.h>
31 31
32struct dmabuf_attributes
33{
34 /* This must exactly match the struct in Enlightenment.
35 * Wayland dmabuf is still an experimental protocol and may
36 * change. If the version doesn't match we won't even attempt
37 * to read the struct.
38 */
39 int version;
40 int32_t width;
41 int32_t height;
42 uint32_t format;
43 uint32_t flags; /* enum zlinux_buffer_params_flags */
44 int n_planes;
45 int fd[4];
46 uint32_t offset[4];
47 uint32_t stride[4];
48 uint64_t modifier[4];
49};
50
32typedef struct _Native Native; 51typedef struct _Native Native;
33struct _Native 52struct _Native
34{ 53{
@@ -54,6 +73,18 @@ struct _Native
54 void *surface; /*egl surface*/ 73 void *surface; /*egl surface*/
55 } wl_surface; /**< Set this struct fields if surface data is Wayland based. */ 74 } wl_surface; /**< Set this struct fields if surface data is Wayland based. */
56 75
76 /* EVAS_NATIVE_SURFACE_WL_DMABUF */
77 struct
78 {
79 struct dmabuf_attributes attr; /* Plane attributes of buffer */
80 void *resource; /* Wayland resource for buffer */
81
82 // Run-time storage for bind/unbind
83 size_t size; /* size of are when mmapped */
84 void *ptr; /* data area when mmapped */
85 void *image; /* EGLImage when bound for GL */
86 } wl_surface_dmabuf; /**< Set this struct fields if surface data is Wayland dmabuf based. */
87
57 /* EVAS_NATIVE_SURFACE_OPENGL */ 88 /* EVAS_NATIVE_SURFACE_OPENGL */
58 struct 89 struct
59 { 90 {