From 46436618d862e60ed051a5b880c86bfd6ac073a2 Mon Sep 17 00:00:00 2001 From: Juan Zhao Date: Tue, 20 Mar 2012 01:48:46 +0800 Subject: [PATCH] weston_surface: initialize pitch 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. --- src/compositor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor.c b/src/compositor.c index 87d19bd2..c790a8bc 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -219,6 +219,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;