[Spice-devel] [PATCH spice-common 7/8] canvas: Unify __surface_create_stride and surface_create_stride

Christophe de Dinechin christophe.de.dinechin at gmail.com
Wed Feb 7 16:26:20 UTC 2018



> On 17 Jan 2018, at 12:31, Frediano Ziglio <fziglio at redhat.com> wrote:
> 
> They are now just the same function with same parameters,
> just one calls the other.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> common/canvas_utils.c | 12 +++---------
> 1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/common/canvas_utils.c b/common/canvas_utils.c
> index 3e143de..a95501f 100644
> --- a/common/canvas_utils.c
> +++ b/common/canvas_utils.c
> @@ -84,8 +84,8 @@ int spice_pixman_image_get_format(pixman_image_t *image, pixman_format_code_t *f
>     return 0;
> }
> 
> -static inline pixman_image_t *__surface_create_stride(pixman_format_code_t format, int width, int height,
> -                                                      int stride)
> +pixman_image_t *surface_create_stride(pixman_format_code_t format, int width, int height,
> +                                      int stride)
> {
>     uint8_t *data;
>     uint8_t *stride_data;
> @@ -157,16 +157,10 @@ pixman_image_t * surface_create(pixman_format_code_t format, int width, int heig
>             spice_error("invalid format");
>         }
>         stride = -stride;
> -        return __surface_create_stride(format, width, height, stride);
> +        return surface_create_stride(format, width, height, stride);
>     }
> }
> 
> -pixman_image_t *surface_create_stride(pixman_format_code_t format, int width, int height,
> -                                      int stride)
> -{
> -    return __surface_create_stride(format, width, height, stride);
> -}
> -

Acked-by: Christophe de Dinechin <dinechin at redhat.com> 

> pixman_image_t *alloc_lz_image_surface(LzDecodeUsrData *canvas_data,
>                                        pixman_format_code_t pixman_format, int width,
>                                        int height, int gross_pixels, int top_down)
> -- 
> 2.14.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list