mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
surface: introduce wlr_surface_get_buffer_source_box
This helper allows compositors to retrieve the buffer source box in buffer-local coordinates.
This commit is contained in:
parent
eb22ae97b0
commit
c618a76540
2 changed files with 34 additions and 0 deletions
|
|
@ -262,4 +262,15 @@ void wlr_surface_for_each_surface(struct wlr_surface *surface,
|
|||
void wlr_surface_get_effective_damage(struct wlr_surface *surface,
|
||||
pixman_region32_t *damage);
|
||||
|
||||
/**
|
||||
* Get the source rectangle describing the region of the buffer that needs to
|
||||
* be sampled to render this surface's current state. The box is in
|
||||
* buffer-local coordinates.
|
||||
*
|
||||
* If the viewport's source rectangle is unset, the position is zero and the
|
||||
* size is the buffer's.
|
||||
*/
|
||||
void wlr_surface_get_buffer_source_box(struct wlr_surface *surface,
|
||||
struct wlr_fbox *box);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue