mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 11:55:59 +01:00
wlr_output_damage: Use wlr_output_damage_add for wlr_output_damage_add_box
This commit is contained in:
parent
4792446ee8
commit
fbd4d40318
1 changed files with 4 additions and 7 deletions
|
@ -206,12 +206,9 @@ void wlr_output_damage_add_whole(struct wlr_output_damage *output_damage) {
|
||||||
|
|
||||||
void wlr_output_damage_add_box(struct wlr_output_damage *output_damage,
|
void wlr_output_damage_add_box(struct wlr_output_damage *output_damage,
|
||||||
struct wlr_box *box) {
|
struct wlr_box *box) {
|
||||||
int width, height;
|
pixman_region32_t damage;
|
||||||
wlr_output_transformed_resolution(output_damage->output, &width, &height);
|
pixman_region32_init_rect(&damage,
|
||||||
|
|
||||||
pixman_region32_union_rect(&output_damage->current, &output_damage->current,
|
|
||||||
box->x, box->y, box->width, box->height);
|
box->x, box->y, box->width, box->height);
|
||||||
pixman_region32_intersect_rect(&output_damage->current,
|
wlr_output_damage_add(output_damage, &damage);
|
||||||
&output_damage->current, 0, 0, width, height);
|
pixman_region32_fini(&damage);
|
||||||
wlr_output_schedule_frame(output_damage->output);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue