mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 22:52:20 +00:00
scene: crop output buffer damage before adding
This piece of logic was accidentally removed in
009515161b
.
This commit is contained in:
parent
3b3ed21e61
commit
7952658367
@ -355,16 +355,22 @@ static void transform_output_box(struct wlr_box *box, const struct render_data *
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void scene_output_damage(struct wlr_scene_output *scene_output,
|
static void scene_output_damage(struct wlr_scene_output *scene_output,
|
||||||
const pixman_region32_t *frame_damage) {
|
const pixman_region32_t *damage) {
|
||||||
if (!pixman_region32_not_empty(frame_damage)) {
|
struct wlr_output *output = scene_output->output;
|
||||||
return;
|
|
||||||
|
pixman_region32_t clipped;
|
||||||
|
pixman_region32_init(&clipped);
|
||||||
|
pixman_region32_intersect_rect(&clipped, damage, 0, 0, output->width, output->height);
|
||||||
|
|
||||||
|
if (pixman_region32_not_empty(&clipped)) {
|
||||||
|
wlr_output_schedule_frame(scene_output->output);
|
||||||
|
wlr_damage_ring_add(&scene_output->damage_ring, &clipped);
|
||||||
|
|
||||||
|
pixman_region32_union(&scene_output->pending_commit_damage,
|
||||||
|
&scene_output->pending_commit_damage, &clipped);
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_output_schedule_frame(scene_output->output);
|
pixman_region32_fini(&clipped);
|
||||||
wlr_damage_ring_add(&scene_output->damage_ring, frame_damage);
|
|
||||||
|
|
||||||
pixman_region32_union(&scene_output->pending_commit_damage,
|
|
||||||
&scene_output->pending_commit_damage, frame_damage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void scene_output_damage_whole(struct wlr_scene_output *scene_output) {
|
static void scene_output_damage_whole(struct wlr_scene_output *scene_output) {
|
||||||
|
Loading…
Reference in New Issue
Block a user