mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 21:43:40 +00:00
[client] egl: pad buffer damage by 1px when rendering desktop
We want to add extra padding to deal with scaling, which may end up blending with neighbouring pixels.
This commit is contained in:
parent
4da0c64583
commit
65e550a61c
@ -901,9 +901,17 @@ static bool egl_render(void * opaque, LG_RendererRotate rotate, const bool newFr
|
||||
break;
|
||||
}
|
||||
|
||||
memcpy(accumulated->rects + accumulated->count, damage->rects,
|
||||
damage->count * sizeof(struct FrameDamageRect));
|
||||
accumulated->count += damage->count;
|
||||
for (int j = 0; j < damage->count; ++j)
|
||||
{
|
||||
struct FrameDamageRect * rect = damage->rects + j;
|
||||
int x = rect->x > 0 ? rect->x - 1 : 0;
|
||||
int y = rect->y > 0 ? rect->y - 1 : 0;
|
||||
accumulated->rects[accumulated->count++] = (struct FrameDamageRect) {
|
||||
.x = x, .y = y,
|
||||
.width = min(this->format.width - x, rect->width + 2),
|
||||
.height = min(this->format.height - y, rect->height + 2),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
desktopDamage = this->desktopDamage + this->desktopDamageIdx;
|
||||
|
Loading…
Reference in New Issue
Block a user