[PATCH] weston_surface: initialize pitch

zhaojuanamy at gmail.com zhaojuanamy at gmail.com
Mon Mar 19 10:48:46 PDT 2012


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.
---
 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