mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-13 05:34:21 -04:00
Remove the wl_visual interface
The visual interface was meant to be a generic mechanism for specifying the content of a buffer. It goes back to before we had the buffer factory interfaces (like wl_drm and wl_shm) and we wanted to keep it open-ended enough that yuv, png or even svg buffer or so would be possible. Now that we have the buffer abstraction, we can add different buffer types by introducing new interfaces that create buffers. It only makes sense to leave it to those interfaces to specify the contents of the buffers. For wl_shm, this means that we now just specify the pixel format using an enum. For EGL buffers, the exact pixel formats are controlled by the implementation (part of wl_drm and similar), and from the client point of view, everything is controlled using EGLConfigs.
This commit is contained in:
parent
f9c8a691b2
commit
c640571c00
5 changed files with 50 additions and 88 deletions
|
|
@ -117,11 +117,6 @@ struct wl_resource {
|
|||
void *data;
|
||||
};
|
||||
|
||||
struct wl_visual {
|
||||
struct wl_object object;
|
||||
uint32_t name;
|
||||
};
|
||||
|
||||
struct wl_shm_callbacks {
|
||||
void (*buffer_created)(struct wl_buffer *buffer);
|
||||
|
||||
|
|
@ -134,14 +129,10 @@ struct wl_shm_callbacks {
|
|||
|
||||
struct wl_compositor {
|
||||
const struct wl_compositor_interface *interface;
|
||||
struct wl_visual argb_visual;
|
||||
struct wl_visual premultiplied_argb_visual;
|
||||
struct wl_visual rgb_visual;
|
||||
};
|
||||
|
||||
struct wl_buffer {
|
||||
struct wl_resource resource;
|
||||
struct wl_visual *visual;
|
||||
int32_t width, height;
|
||||
uint32_t busy_count;
|
||||
void *user_data;
|
||||
|
|
@ -285,10 +276,12 @@ wl_shm_buffer_get_data(struct wl_buffer *buffer);
|
|||
int32_t
|
||||
wl_shm_buffer_get_stride(struct wl_buffer *buffer);
|
||||
|
||||
uint32_t
|
||||
wl_shm_buffer_get_format(struct wl_buffer *buffer);
|
||||
|
||||
struct wl_buffer *
|
||||
wl_shm_buffer_create(struct wl_shm *shm, int width, int height,
|
||||
int stride, struct wl_visual *visual,
|
||||
void *data);
|
||||
int stride, uint32_t visual, void *data);
|
||||
|
||||
int
|
||||
wl_buffer_is_shm(struct wl_buffer *buffer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue