mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
output: switch swap_buffers damage to output-buffer-local coords
This is one more step towards [1]. This gives more freedom to the compositor wrt. how it handles damage. [1]: https://github.com/swaywm/wlroots/issues/1363
This commit is contained in:
parent
a22311ec76
commit
6aaefad40d
3 changed files with 12 additions and 14 deletions
|
|
@ -522,12 +522,17 @@ renderer_end:
|
|||
wlr_renderer_scissor(renderer, NULL);
|
||||
wlr_renderer_end(renderer);
|
||||
|
||||
int width, height;
|
||||
wlr_output_transformed_resolution(wlr_output, &width, &height);
|
||||
|
||||
if (server->config->debug_damage_tracking) {
|
||||
int width, height;
|
||||
wlr_output_transformed_resolution(wlr_output, &width, &height);
|
||||
pixman_region32_union_rect(&damage, &damage, 0, 0, width, height);
|
||||
}
|
||||
|
||||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(wlr_output->transform);
|
||||
wlr_region_transform(&damage, &damage, transform, width, height);
|
||||
|
||||
if (!wlr_output_damage_swap_buffers(output->damage, &now, &damage)) {
|
||||
goto damage_finish;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue