mirror of
https://github.com/swaywm/sway.git
synced 2024-12-30 17:06:40 +01:00
Merge pull request #3227 from emersion/swap-buffers-damage-coords
Update for swaywm/wlroots#1403
This commit is contained in:
commit
974a3fbc59
1 changed files with 12 additions and 5 deletions
|
@ -1079,15 +1079,22 @@ renderer_end:
|
||||||
wlr_render_texture(renderer, root->debug_tree,
|
wlr_render_texture(renderer, root->debug_tree,
|
||||||
wlr_output->transform_matrix, 0, 40, 1);
|
wlr_output->transform_matrix, 0, 40, 1);
|
||||||
}
|
}
|
||||||
if (debug.damage == DAMAGE_HIGHLIGHT) {
|
|
||||||
int width, height;
|
|
||||||
wlr_output_transformed_resolution(wlr_output, &width, &height);
|
|
||||||
pixman_region32_union_rect(damage, damage, 0, 0, width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
wlr_renderer_scissor(renderer, NULL);
|
wlr_renderer_scissor(renderer, NULL);
|
||||||
wlr_output_render_software_cursors(wlr_output, damage);
|
wlr_output_render_software_cursors(wlr_output, damage);
|
||||||
wlr_renderer_end(renderer);
|
wlr_renderer_end(renderer);
|
||||||
|
|
||||||
|
int width, height;
|
||||||
|
wlr_output_transformed_resolution(wlr_output, &width, &height);
|
||||||
|
|
||||||
|
if (debug.damage == DAMAGE_HIGHLIGHT) {
|
||||||
|
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, when, damage)) {
|
if (!wlr_output_damage_swap_buffers(output->damage, when, damage)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue