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
This commit is contained in:
parent
67eb289a6a
commit
0adc56779f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user