mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
Merge pull request #1261 from arandomhuman/damage-control
Fix damage tracking for surfaces with transforms
This commit is contained in:
commit
d7b010024a
3 changed files with 73 additions and 67 deletions
|
|
@ -708,16 +708,11 @@ static void damage_from_surface(struct wlr_surface *surface, int sx, int sy,
|
|||
int center_x = box.x + box.width/2;
|
||||
int center_y = box.y + box.height/2;
|
||||
|
||||
enum wl_output_transform transform =
|
||||
wlr_output_transform_invert(surface->current.transform);
|
||||
|
||||
pixman_region32_t damage;
|
||||
pixman_region32_init(&damage);
|
||||
pixman_region32_copy(&damage, &surface->buffer_damage);
|
||||
wlr_region_transform(&damage, &damage, transform,
|
||||
surface->current.buffer_width, surface->current.buffer_height);
|
||||
wlr_region_scale(&damage, &damage,
|
||||
wlr_output->scale / (float)surface->current.scale);
|
||||
wlr_surface_get_effective_damage(surface, &damage);
|
||||
|
||||
wlr_region_scale(&damage, &damage, wlr_output->scale);
|
||||
if (ceil(wlr_output->scale) > surface->current.scale) {
|
||||
// When scaling up a surface, it'll become blurry so we need to
|
||||
// expand the damage region
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue