[PATCH weston 2/2] compositor: Add doxygen for weston_surface_to_buffer_rect()

Pekka Paalanen ppaalanen at gmail.com
Tue Dec 1 23:04:45 PST 2015


On Tue,  1 Dec 2015 13:00:44 -0600
Derek Foreman <derekf at osg.samsung.com> wrote:

> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> ---
>  src/compositor.c | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index 0118b67..43cd094 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -932,6 +932,24 @@ weston_surface_to_buffer(struct weston_surface *surface,
>  	*by = floorf(byf);
>  }
>  
> +/* Transform a rectangle from surface coordinates to buffer coordinates

You might need one more * on the first line to have Doxygen pick this
up.

> + *
> + * \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)
> @@ -965,7 +983,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,

Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151202/6080e0b9/attachment.sig>


More information about the wayland-devel mailing list