1
0
Fork 0

stage: Clamp to pixel the redraw clip taking care of the floored coords

When we floor the quad coordinates then we've also to enlarge the quad by the
difference between the floored value and the actual coordinate, otherwise
we'd end up in a smaller quad.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/3
This commit is contained in:
Marco Trevisan (Treviño) 2019-02-28 22:50:50 +01:00 committed by Marco Trevisan
parent d7ec5d3022
commit f4c2b69934

View file

@ -225,6 +225,11 @@ queue_redraw_clutter_rect (MetaStage *stage,
.height = ceilf (rect->size.height)
};
/* Since we're flooring the coordinates, we need to enlarge the clip by the
* difference between the actual coordinate and the floored value */
clip.width += ceilf (rect->origin.x - clip.x) * 2;
clip.height += ceilf (rect->origin.y - clip.y) * 2;
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stage), &clip);
}