shell: Explicitly use solid weston_buffers
Rather than punching through to set the surface as a solid colour, attach an actual weston_buffer to it instead. This becomes the first user of attaching non-client-generated buffers to a weston_surface. As a result, it is necessary to introduce a function which will allow compositors and shells to attach a buffer to a surface. weston_surface_attach_solid() is therefore introduced as a special-purpose helper which will attach a solid buffer to a weston_surface. It is not intended as a general-purpose mechanism to allow compositors to attach client-generated buffers to surfaces, as doing so would have unknown effects on this core part of the compositor itself. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
@@ -1776,6 +1776,11 @@ struct weston_buffer_reference *
|
||||
weston_buffer_create_solid_rgba(struct weston_compositor *compositor,
|
||||
float r, float g, float b, float a);
|
||||
|
||||
void
|
||||
weston_surface_attach_solid(struct weston_surface *surface,
|
||||
struct weston_buffer_reference *buffer_ref,
|
||||
int w, int h);
|
||||
|
||||
void
|
||||
weston_buffer_destroy_solid(struct weston_buffer_reference *buffer_ref);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user