mirror of
https://github.com/brl/mutter.git
synced 2025-02-19 14:44:10 +00:00

cogl_(fromebuffer)_set_viewport will implicitly cast away the fraction of a floating point number, meaning if a coordinate calculation resulted in just below the integer (which for example ~1.75 scaling on a 1920x1080 did), we'd set a one pixel too narrow viewport. Fix this by always rounding the floating point to the closest int before passing, avoiding the precision loss. https://bugzilla.gnome.org/show_bug.cgi?id=765011