Commit 3b775635 authored by Daniel Stone's avatar Daniel Stone

compositor: Add weston_layer_mask_is_infinite

As a counterpart to weston_layer_set_mask_infinite(), returning if the
mask is the same as what is set.
Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent 5c91bb8d
......@@ -2746,6 +2746,15 @@ weston_layer_set_mask_infinite(struct weston_layer *layer)
UINT32_MAX, UINT32_MAX);
}
WL_EXPORT bool
weston_layer_mask_is_infinite(struct weston_layer *layer)
{
return layer->mask.x1 == INT32_MIN &&
layer->mask.y1 == INT32_MIN &&
layer->mask.x2 == INT32_MIN + UINT32_MAX &&
layer->mask.y2 == INT32_MIN + UINT32_MAX;
}
WL_EXPORT void
weston_output_schedule_repaint(struct weston_output *output)
{
......
......@@ -1685,6 +1685,9 @@ weston_layer_set_mask(struct weston_layer *layer, int x, int y, int width, int h
void
weston_layer_set_mask_infinite(struct weston_layer *layer);
bool
weston_layer_mask_is_infinite(struct weston_layer *layer);
void
weston_plane_init(struct weston_plane *plane,
struct weston_compositor *ec,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment