mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Fix damage tracking for rotated surfaces
It was broken because the damage extents were rotated about its own center, not about the center of the surface. This adds a new wlr_region_rotated_bounds that rotates regions. This allows us to have only one code path (for both non-rotated views and rotated views) and optimizes rendering for rotated views.
This commit is contained in:
parent
bcb74c2c78
commit
4555fc8a54
4 changed files with 76 additions and 26 deletions
|
|
@ -26,4 +26,11 @@ void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src,
|
|||
void wlr_region_expand(pixman_region32_t *dst, pixman_region32_t *src,
|
||||
int distance);
|
||||
|
||||
/*
|
||||
* Builds the smallest possible region that contains the region rotated about
|
||||
* the point (ox, oy).
|
||||
*/
|
||||
void wlr_region_rotated_bounds(pixman_region32_t *dst, pixman_region32_t *src,
|
||||
float rotation, int ox, int oy);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue