Commit 0adc5677 authored by Jonas Ådahl's avatar Jonas Ådahl

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
parent 67eb289a
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment