[PATCH] weston_surface: initialize pitch

Kristian Hoegsberg hoegsberg at gmail.com
Tue Mar 20 13:55:22 PDT 2012


On Tue, Mar 20, 2012 at 01:48:46AM +0800, zhaojuanamy at gmail.com wrote:
> From: Juan Zhao <juan.j.zhao at linux.intel.com>
> 
> Initializing pitch to 1 to avoid xxx/pitch errors
> This won't influence the valid texture coordinate calculation, because
>  in that case buffer_attach will provide the correct value.
> ---

Thanks, looks good.

Kristian

>  src/compositor.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index f2ae2f6..02624d9 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -216,6 +216,7 @@ weston_surface_create(struct weston_compositor *compositor)
>  	surface->compositor = compositor;
>  	surface->image = EGL_NO_IMAGE_KHR;
>  	surface->alpha = 255;
> +	surface->pitch = 1;
>  
>  	surface->buffer = NULL;
>  	surface->output = NULL;
> -- 
> 1.7.5.4
> 


More information about the wayland-devel mailing list