mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
wlr_scene: Fix WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT when output is transformed
(cherry picked from commit 4f1104654f)
This commit is contained in:
parent
055c0d28d1
commit
72a290ba01
1 changed files with 8 additions and 1 deletions
|
|
@ -1976,11 +1976,18 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
|||
int64_t time_diff_ms = timespec_to_msec(&time_diff);
|
||||
float alpha = 1.0 - (double)time_diff_ms / HIGHLIGHT_DAMAGE_FADEOUT_TIME;
|
||||
|
||||
pixman_region32_t clip;
|
||||
pixman_region32_init(&clip);
|
||||
pixman_region32_copy(&clip, &damage->region);
|
||||
transform_output_damage(&clip, &render_data);
|
||||
|
||||
wlr_render_pass_add_rect(render_pass, &(struct wlr_render_rect_options){
|
||||
.box = { .width = buffer->width, .height = buffer->height },
|
||||
.color = { .r = alpha * 0.5, .g = 0, .b = 0, .a = alpha * 0.5 },
|
||||
.clip = &damage->region,
|
||||
.clip = &clip,
|
||||
});
|
||||
|
||||
pixman_region32_fini(&clip);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue