1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
From 3b7756351d31a72da11ff09c56efa17960db1b20 Mon Sep 17 00:00:00 2001
From: Daniel Stone <daniels@collabora.com>
Date: Fri, 20 Jul 2018 08:38:25 +0100
Subject: [PATCH 14/46] 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 <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
---
libweston/compositor.c | 9 +++++++++
libweston/compositor.h | 3 +++
2 files changed, 12 insertions(+)
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 01616550..a38c4c1b 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -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)
{
diff --git a/libweston/compositor.h b/libweston/compositor.h
index 33f02b18..069fb03d 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -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,
--
2.16.2
|