rooston: restrict damage to output extents

This commit is contained in:
emersion 2018-01-19 14:32:42 +01:00
parent e29a0df8c1
commit d6c74d8a16
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 3 additions and 3 deletions

View File

@ -296,6 +296,8 @@ static void render_output(struct roots_output *output) {
pixman_region32_t damage; pixman_region32_t damage;
pixman_region32_init(&damage); pixman_region32_init(&damage);
pixman_region32_union(&damage, &output->damage, &output->previous_damage); pixman_region32_union(&damage, &output->damage, &output->previous_damage);
pixman_region32_intersect_rect(&damage, &damage, 0, 0, wlr_output->width,
wlr_output->height);
// TODO: fullscreen // TODO: fullscreen
if (!pixman_region32_not_empty(&damage)) { if (!pixman_region32_not_empty(&damage)) {
@ -404,10 +406,8 @@ static void schedule_render(struct roots_output *output) {
} }
static void output_damage_whole(struct roots_output *output) { static void output_damage_whole(struct roots_output *output) {
int width, height;
wlr_output_effective_resolution(output->wlr_output, &width, &height);
pixman_region32_union_rect(&output->damage, &output->damage, pixman_region32_union_rect(&output->damage, &output->damage,
0, 0, width, height); 0, 0, output->wlr_output->width, output->wlr_output->height);
schedule_render(output); schedule_render(output);
} }