[mutter] stage: Clamp to pixel the redraw clip taking care of the floored coords
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] stage: Clamp to pixel the redraw clip taking care of the floored coords
- Date: Fri, 1 Mar 2019 18:06:41 +0000 (UTC)
commit f4c2b69934e05c4e308256247109b9610a8d085e
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Thu Feb 28 22:50:50 2019 +0100
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
src/backends/meta-stage.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/backends/meta-stage.c b/src/backends/meta-stage.c
index f536fc23a..425926a7c 100644
--- a/src/backends/meta-stage.c
+++ b/src/backends/meta-stage.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]