mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
Use wlr_surface_get_effective_damage
This commit is contained in:
parent
d19648a304
commit
0e85b92250
|
@ -415,16 +415,10 @@ static void damage_surface_iterator(struct sway_output *output,
|
||||||
int center_y = box.y + box.height/2;
|
int center_y = box.y + box.height/2;
|
||||||
|
|
||||||
if (pixman_region32_not_empty(&surface->buffer_damage)) {
|
if (pixman_region32_not_empty(&surface->buffer_damage)) {
|
||||||
enum wl_output_transform transform =
|
|
||||||
wlr_output_transform_invert(surface->current.transform);
|
|
||||||
|
|
||||||
pixman_region32_t damage;
|
pixman_region32_t damage;
|
||||||
pixman_region32_init(&damage);
|
pixman_region32_init(&damage);
|
||||||
pixman_region32_copy(&damage, &surface->buffer_damage);
|
wlr_surface_get_effective_damage(surface, &damage);
|
||||||
wlr_region_transform(&damage, &damage, transform,
|
wlr_region_scale(&damage, &damage, output->wlr_output->scale);
|
||||||
surface->current.buffer_width, surface->current.buffer_height);
|
|
||||||
wlr_region_scale(&damage, &damage,
|
|
||||||
output->wlr_output->scale / (float)surface->current.scale);
|
|
||||||
if (ceil(output->wlr_output->scale) > surface->current.scale) {
|
if (ceil(output->wlr_output->scale) > surface->current.scale) {
|
||||||
// When scaling up a surface, it'll become blurry so we need to
|
// When scaling up a surface, it'll become blurry so we need to
|
||||||
// expand the damage region
|
// expand the damage region
|
||||||
|
|
Loading…
Reference in a new issue