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.
This commit is contained in:
Juan Zhao 2012-03-20 01:48:46 +08:00 committed by Kristian Høgsberg
parent 027b962d8c
commit 46436618d8

View File

@ -219,6 +219,7 @@ weston_surface_create(struct weston_compositor *compositor)
surface->compositor = compositor; surface->compositor = compositor;
surface->image = EGL_NO_IMAGE_KHR; surface->image = EGL_NO_IMAGE_KHR;
surface->alpha = 255; surface->alpha = 255;
surface->pitch = 1;
surface->buffer = NULL; surface->buffer = NULL;
surface->output = NULL; surface->output = NULL;