aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/render/interface.h1
-rw-r--r--include/wlr/render/wlr_texture.h5
-rw-r--r--include/wlr/types/wlr_surface.h6
3 files changed, 12 insertions, 0 deletions
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h
index 1b138ea3..f4565ad5 100644
--- a/include/wlr/render/interface.h
+++ b/include/wlr/render/interface.h
@@ -56,6 +56,7 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
struct wlr_texture_impl {
void (*get_size)(struct wlr_texture *texture, int *width, int *height);
+ bool (*is_opaque)(struct wlr_texture *texture);
bool (*write_pixels)(struct wlr_texture *texture,
enum wl_shm_format wl_fmt, uint32_t stride, uint32_t width,
uint32_t height, uint32_t src_x, uint32_t src_y, uint32_t dst_x,
diff --git a/include/wlr/render/wlr_texture.h b/include/wlr/render/wlr_texture.h
index 785f4fc6..9370fa25 100644
--- a/include/wlr/render/wlr_texture.h
+++ b/include/wlr/render/wlr_texture.h
@@ -41,6 +41,11 @@ struct wlr_texture *wlr_texture_from_dmabuf(struct wlr_renderer *renderer,
void wlr_texture_get_size(struct wlr_texture *texture, int *width, int *height);
/**
+ * Returns true if this texture is using a fully opaque format.
+ */
+bool wlr_texture_is_opaque(struct wlr_texture *texture);
+
+/**
* Update a texture with raw pixels. The texture must be mutable.
*/
bool wlr_texture_write_pixels(struct wlr_texture *texture,
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index 93f456cd..0e3b5ff4 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -67,6 +67,12 @@ struct wlr_surface {
*/
pixman_region32_t buffer_damage;
/**
+ * The current opaque region, in surface-local coordinates. It is clipped to
+ * the surface bounds. If the surface's buffer is using a fully opaque
+ * format, this is set to the whole surface.
+ */
+ pixman_region32_t opaque_region;
+ /**
* `current` contains the current, committed surface state. `pending`
* accumulates state changes from the client between commits and shouldn't
* be accessed by the compositor directly. `previous` contains the state of