compositor: use floats in computing bounding box
authorPekka Paalanen <ppaalanen@gmail.com>
Wed, 8 Feb 2012 13:38:37 +0000 (15:38 +0200)
committerPekka Paalanen <ppaalanen@gmail.com>
Fri, 10 Feb 2012 13:47:56 +0000 (15:47 +0200)
commit219b982ed076d3f0bb9a6199509fb260b8fe8b26
tree11617cb0afc0d3d2aa89ffff25fb150a4de3c9bc
parentece8a016aaafbb54380e6c12cd7fdde972202740
compositor: use floats in computing bounding box

In surface_compute_bbox(), call surface_to_global_float() instead of
weston_surface_to_global(). This avoids the recursion:

weston_surface_update_transform()
  weston_surface_update_transform_enable()
    surface_compute_bbox()
       weston_surface_to_global()
         weston_surface_update_transform()

which might be non-obvious when reading the code.

Computing the min and max coordinates in floats, we can have a tight
rounding margin by using floor() and ceil().

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
src/compositor.c