diff options
author | Derek Foreman <derekf@osg.samsung.com> | 2015-12-03 16:38:11 -0600 |
---|---|---|
committer | Derek Foreman <derekf@osg.samsung.com> | 2015-12-03 16:38:11 -0600 |
commit | 99739671387e3defb950b49bb72f26b6a193419f (patch) | |
tree | 83d0909503c808cb73ffbcc35ebff8cae118ef12 /src | |
parent | fb1e1268d5344656f31c4f9a56107d649a9fab7f (diff) | |
download | weston-99739671387e3defb950b49bb72f26b6a193419f.tar.gz |
compositor: Add doxygen for weston_surface_to_buffer_rect()
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/compositor.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/compositor.c b/src/compositor.c index 9e153104..254e9e48 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -921,6 +921,24 @@ weston_surface_to_buffer_float(struct weston_surface *surface, *bx, *by, bx, by); } +/** Transform a rectangle from surface coordinates to buffer coordinates + * + * \param surface The surface to fetch wl_viewport and buffer transformation + * from. + * \param rect The rectangle to transform. + * \return The transformed rectangle. + * + * Viewport and buffer transformations can only do translation, scaling, + * and rotations in 90-degree steps. Therefore the only loss in the + * conversion is coordinate rounding. + * + * However, some coordinate rounding takes place as an intermediate + * step before the buffer scale factor is applied, so the rectangle + * boundary may not be exactly as expected. + * + * This is OK for damage tracking since a little extra coverage is + * not a problem. + */ WL_EXPORT pixman_box32_t weston_surface_to_buffer_rect(struct weston_surface *surface, pixman_box32_t rect) @@ -954,7 +972,8 @@ weston_surface_to_buffer_rect(struct weston_surface *surface, * * Viewport and buffer transformations can only do translation, scaling, * and rotations in 90-degree steps. Therefore the only loss in the - * conversion is coordinate flooring (rounding). + * conversion is from the coordinate rounding that takes place in + * \ref weston_surface_to_buffer_rect. */ WL_EXPORT void weston_surface_to_buffer_region(struct weston_surface *surface, |