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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user