mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-07-21 18:54:13 +00:00
Add weston_surface_has_content()
Just a trivial wrapper to tell you whether or not the surface has valid content. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
f212a703cf
commit
13ead893e2
|
@ -1928,6 +1928,9 @@ weston_surface_attach_solid(struct weston_surface *surface,
|
||||||
void
|
void
|
||||||
weston_buffer_destroy_solid(struct weston_buffer_reference *buffer_ref);
|
weston_buffer_destroy_solid(struct weston_buffer_reference *buffer_ref);
|
||||||
|
|
||||||
|
bool
|
||||||
|
weston_surface_has_content(struct weston_surface *surface);
|
||||||
|
|
||||||
void
|
void
|
||||||
weston_view_destroy(struct weston_view *view);
|
weston_view_destroy(struct weston_view *view);
|
||||||
|
|
||||||
|
|
|
@ -3609,6 +3609,16 @@ weston_compositor_schedule_repaint(struct weston_compositor *compositor)
|
||||||
weston_output_schedule_repaint(output);
|
weston_output_schedule_repaint(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if a surface has a buffer attached to it and thus valid
|
||||||
|
* content available.
|
||||||
|
*/
|
||||||
|
WL_EXPORT bool
|
||||||
|
weston_surface_has_content(struct weston_surface *surface)
|
||||||
|
{
|
||||||
|
return !!surface->buffer_ref.buffer;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
surface_destroy(struct wl_client *client, struct wl_resource *resource)
|
surface_destroy(struct wl_client *client, struct wl_resource *resource)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue