diff options
author | Giulio Camuffo <giuliocamuffo@gmail.com> | 2014-07-09 22:12:57 +0300 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2014-07-23 12:34:33 -0700 |
commit | 95ec0f95aa2df74c2da19e7dda24528fa8f765cc (patch) | |
tree | f33fa0b8815721d77221f145277b7549a61b0ccd /src/compositor.h | |
parent | 412e6a59eb90da5b29226e0b32f4a1a8e21c6500 (diff) | |
download | weston-95ec0f95aa2df74c2da19e7dda24528fa8f765cc.tar.gz |
compositor: add a masking mechanism to weston_layer
this adds a mechanism to mask the views belonging to a layer
to an arbitrary rect, in the global space. The parts that don't fit
in that rect will be clipped away.
Supported by the gl and pixman renderer only for now.
Diffstat (limited to 'src/compositor.h')
-rw-r--r-- | src/compositor.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compositor.h b/src/compositor.h index 9bbd8440..102cfa7d 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -534,6 +534,7 @@ struct weston_layer_entry { struct weston_layer { struct weston_layer_entry view_list; struct wl_list link; + pixman_box32_t mask; }; struct weston_plane { @@ -738,6 +739,7 @@ struct weston_view { struct wl_list link; struct weston_layer_entry layer_link; struct weston_plane *plane; + struct weston_view *parent_view; pixman_region32_t clip; float alpha; /* part of geometry, see below */ @@ -769,6 +771,8 @@ struct weston_view { pixman_region32_t boundingbox; pixman_region32_t opaque; + pixman_region32_t masked_boundingbox; + pixman_region32_t masked_opaque; /* matrix and inverse are used only if enabled = 1. * If enabled = 0, use x, y, width, height directly. @@ -1010,6 +1014,12 @@ void weston_layer_init(struct weston_layer *layer, struct wl_list *below); void +weston_layer_set_mask(struct weston_layer *layer, int x, int y, int width, int height); + +void +weston_layer_set_mask_infinite(struct weston_layer *layer); + +void weston_plane_init(struct weston_plane *plane, struct weston_compositor *ec, int32_t x, int32_t y); |