refactor buffer detection

This commit is contained in:
Tony Crisci 2017-10-22 21:07:32 -04:00
parent 53174f3d61
commit d1dd0a6970
4 changed files with 19 additions and 8 deletions

View file

@ -109,6 +109,14 @@ void wlr_surface_get_matrix(struct wlr_surface *surface,
int wlr_surface_set_role(struct wlr_surface *surface, const char *role,
struct wl_resource *error_resource, uint32_t error_code);
/**
* Whether or not this surface currently has an attached buffer. A surface has
* an attached buffer when it commits with a non-null buffer in its pending
* state. A surface will not have a buffer if it has never committed one, has
* committed a null buffer, or something went wrong with uploading the buffer.
*/
bool wlr_surface_has_buffer(struct wlr_surface *surface);
/**
* Create the subsurface implementation for this surface.
*/