[mutter] clutter/stage: Don't loose precision when setting up viewport
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage: Don't loose precision when setting up viewport
- Date: Fri, 14 Jul 2017 13:02:02 +0000 (UTC)
commit 0adc56779f9bc97e61d5fd89f02e12e33baa8105
Author: Jonas Ådahl <jadahl gmail com>
Date: Thu Jun 8 10:05:05 2017 +0800
clutter/stage: Don't loose precision when setting up viewport
We always hit non-fractional floats here because the stage views are
always made so that they are aligned on integer positions with integer
sizes, but there is no reason to go float -> int -> float when
calculating the viewport.
https://bugzilla.gnome.org/show_bug.cgi?id=765011
clutter/clutter/clutter-stage.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index 43bcb8b..1fa7626 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1446,8 +1446,8 @@ _clutter_stage_do_pick_on_view (ClutterStage *stage,
gint read_y;
float fb_width, fb_height;
float fb_scale;
- int viewport_offset_x;
- int viewport_offset_y;
+ float viewport_offset_x;
+ float viewport_offset_y;
priv = stage->priv;
@@ -3623,8 +3623,8 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage,
cairo_rectangle_int_t view_layout;
ClutterPerspective perspective;
float fb_scale;
- int viewport_offset_x;
- int viewport_offset_y;
+ float viewport_offset_x;
+ float viewport_offset_y;
float z_2d;
CLUTTER_NOTE (PAINT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]