summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2004-09-15 16:52:14 +0000
committerDavid Reveman <davidr@novell.com>2004-09-15 16:52:14 +0000
commit8ef453c7524e36ee8f4fd04042724585bbafe3a0 (patch)
treeaa49c95bc020a16d12e2ca11f0880daa870eb696
parent9ecdd2b597bfbc8e382da572b003522067f88eaa (diff)
Minor pixel transfer fix
-rw-r--r--ChangeLog5
-rw-r--r--src/glitz_pixel.c12
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 <c99drn@cs.umu.se>
+
+ * src/glitz_pixel.c (glitz_set_pixels): Get texture before pixel
+ transform and buffer bind.
+
2004-09-14 David Reveman <c99drn@cs.umu.se>
* 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);