From 249713bbe0ebb046c091d8cb2ec9ed7b70eb3923 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Fri, 6 Jan 2012 15:24:52 -0500 Subject: [PATCH] Remove redundant glTexImage2D() call When we later upload the cursor image with glTexImage2D(), that will unbind the image just fine. No need for a NULL upload. Except that that doesn't currently happen with mesa drivers, but the NULL upload is redundant either way. --- src/compositor.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 08278c6c8..b33ed8a42 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -410,10 +410,6 @@ weston_buffer_attach(struct wl_buffer *buffer, struct wl_surface *surface) glBindTexture(GL_TEXTURE_2D, es->texture); if (wl_buffer_is_shm(buffer)) { - /* Unbind any EGLImage texture that may be bound, so we don't - * overwrite it.*/ - glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, - 0, 0, 0, GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL); es->pitch = wl_shm_buffer_get_stride(buffer) / 4; glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT, es->pitch, buffer->height, 0,