From 8ef453c7524e36ee8f4fd04042724585bbafe3a0 Mon Sep 17 00:00:00 2001 From: David Reveman Date: Wed, 15 Sep 2004 16:52:14 +0000 Subject: Minor pixel transfer fix --- ChangeLog | 5 +++++ src/glitz_pixel.c | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bcef092..a0147ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-09-15 David Reveman + + * src/glitz_pixel.c (glitz_set_pixels): Get texture before pixel + transform and buffer bind. + 2004-09-14 David Reveman * src/glitz_compose.c: Fixed division by zero bug that occurred when diff --git a/src/glitz_pixel.c b/src/glitz_pixel.c index 0cb5e75..2701f16 100644 --- a/src/glitz_pixel.c +++ b/src/glitz_pixel.c @@ -451,6 +451,12 @@ glitz_set_pixels (glitz_surface_t *dst, to_drawable = 0; } else glitz_surface_push_current (dst, GLITZ_CN_ANY_CONTEXT_CURRENT); + + texture = glitz_surface_get_texture (dst, 1); + if (!texture) { + glitz_surface_pop_current (dst); + return; + } if (transform) { glitz_image_t src_image, dst_image; @@ -494,12 +500,6 @@ glitz_set_pixels (glitz_surface_t *dst, pixels = glitz_buffer_bind (buffer, GLITZ_GL_PIXEL_UNPACK_BUFFER); pixels += format->skip_lines * bytes_per_line; } - - texture = glitz_surface_get_texture (dst, 1); - if (!texture) { - glitz_surface_pop_current (dst); - return; - } glitz_texture_bind (gl, texture); -- cgit v1.2.3