summaryrefslogtreecommitdiff
path: root/src/wayland/meta-wayland-buffer.h
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2016-12-09 11:15:11 +0800
committerJonas Ådahl <jadahl@gmail.com>2017-01-03 17:50:03 +0800
commit405aa8fb9ea290a2f3e10f3e2ee65540fece9f91 (patch)
treebe5a51a94f3398b30a3da78cb6c8d5bf0517101c /src/wayland/meta-wayland-buffer.h
parent0a826da33084953ea6e981af9a4eb36b36cb4efb (diff)
downloadmutter-405aa8fb9ea290a2f3e10f3e2ee65540fece9f91.tar.gz
wayland/buffer: Add 'realization' concept to buffers
Instead of having a way to determine the type of a buffer, add a realization step that implicitly detects the buffer type. This makes it possible to both realize (i.e. creating needed objects from the buffer) and determine the type at the same time, which may be the only possible way (for example, the only way to know whether a buffer is a EGLStream is to create the EGLStream from it). https://bugzilla.gnome.org/show_bug.cgi?id=773629
Diffstat (limited to 'src/wayland/meta-wayland-buffer.h')
-rw-r--r--src/wayland/meta-wayland-buffer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-buffer.h b/src/wayland/meta-wayland-buffer.h
index 9189e2873..39ec8fe99 100644
--- a/src/wayland/meta-wayland-buffer.h
+++ b/src/wayland/meta-wayland-buffer.h
@@ -32,6 +32,14 @@
#include "meta-wayland-types.h"
#include "meta-wayland-egl-stream.h"
+typedef enum _MetaWaylandBufferType
+{
+ META_WAYLAND_BUFFER_TYPE_UNKNOWN,
+ META_WAYLAND_BUFFER_TYPE_SHM,
+ META_WAYLAND_BUFFER_TYPE_EGL_IMAGE,
+ META_WAYLAND_BUFFER_TYPE_EGL_STREAM,
+} MetaWaylandBufferType;
+
struct _MetaWaylandBuffer
{
GObject parent;
@@ -42,6 +50,8 @@ struct _MetaWaylandBuffer
CoglTexture *texture;
gboolean is_y_inverted;
+ MetaWaylandBufferType type;
+
struct {
MetaWaylandEglStream *stream;
} egl_stream;