mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 22:52:20 +00:00
wlr_scene: Fix WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT when output is transformed
This commit is contained in:
parent
14e1987f50
commit
4f1104654f
@ -2066,11 +2066,18 @@ bool wlr_scene_output_build_state(struct wlr_scene_output *scene_output,
|
|||||||
int64_t time_diff_ms = timespec_to_msec(&time_diff);
|
int64_t time_diff_ms = timespec_to_msec(&time_diff);
|
||||||
float alpha = 1.0 - (double)time_diff_ms / HIGHLIGHT_DAMAGE_FADEOUT_TIME;
|
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){
|
wlr_render_pass_add_rect(render_pass, &(struct wlr_render_rect_options){
|
||||||
.box = { .width = buffer->width, .height = buffer->height },
|
.box = { .width = buffer->width, .height = buffer->height },
|
||||||
.color = { .r = alpha * 0.5, .g = 0, .b = 0, .a = alpha * 0.5 },
|
.color = { .r = alpha * 0.5, .g = 0, .b = 0, .a = alpha * 0.5 },
|
||||||
.clip = &damage->region,
|
.clip = &clip,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
pixman_region32_fini(&clip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user