cogl-clip-stack: Round the coords when clipping to a window rect
The size and position of the window rectangle for clipping in try_pushing_rect_as_window_rect is calculated by projecting the rectangle coordinates. Due to rounding errors, this can end up with slightly off numbers like 34.999999. These were then being cast directly to an integer so it could end up off by one. This uses a new macro called COGL_UTIL_NEARBYINT which is a replacement for the C99 nearbyint function.
Showing with 13 additions and 1 deletion