render: Add region of interest to wlr_texture_read_pixels_options

This adds a region of interest option, outside of which data need not be
copied.
This commit is contained in:
Andri Yngvason 2024-05-01 13:24:35 +00:00
parent 341154a5f6
commit 55e794203a
3 changed files with 19 additions and 2 deletions

View file

@ -37,6 +37,8 @@ struct wlr_texture_read_pixels_options {
uint32_t dst_x, dst_y;
/** Source box of the texture to read from. If empty, the full texture is assumed. */
const struct wlr_box src_box;
/** Region of interest within source box. If NULL, the full region is assumed to be of interest. */
struct pixman_region32 *roi;
};
bool wlr_texture_read_pixels(struct wlr_texture *texture,