[cairo-commit] glitz/src glitz.c,1.28,1.29 glitz_pixel.c,1.11,1.12
David Reveman
commit at pdx.freedesktop.org
Wed Oct 20 16:03:38 PDT 2004
Committed by: davidr
Update of /cvs/cairo/glitz/src
In directory gabe:/tmp/cvs-serv26945/src
Modified Files:
glitz.c glitz_pixel.c
Log Message:
Read buffer and scissor box fixes
Index: glitz.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- glitz.c 6 Oct 2004 18:21:48 -0000 1.28
+++ glitz.c 20 Oct 2004 23:03:36 -0000 1.29
@@ -464,7 +464,9 @@
gl->read_buffer (src->read_buffer);
glitz_set_operator (gl, GLITZ_OPERATOR_SRC);
-
+
+ gl->scissor (0, 0, dst->width, dst->height);
+
glitz_set_raster_pos (gl, x_dst, dst->height - (y_dst + height));
gl->copy_pixels (x_src, src->height - (y_src + height),
width, height, GLITZ_GL_COLOR);
@@ -476,7 +478,7 @@
glitz_texture_set_tex_gen (gl, texture,
x_dst - x_src,
y_dst - y_src,
- 0);
+ 0);
gl->tex_env_f (GLITZ_GL_TEXTURE_ENV, GLITZ_GL_TEXTURE_ENV_MODE,
GLITZ_GL_REPLACE);
@@ -500,15 +502,21 @@
}
glitz_surface_dirty (dst, &box);
- glitz_surface_pop_current (dst);
status = 1;
}
+ glitz_surface_pop_current (dst);
+
if (!status) {
if (glitz_surface_push_current (src, GLITZ_CN_SURFACE_DRAWABLE_CURRENT)) {
glitz_texture_t *texture;
+ if (src->format->doublebuffer)
+ gl->read_buffer (src->read_buffer);
+
+ gl->scissor (0, 0, src->width, src->height);
+
texture = glitz_surface_get_texture (dst, 1);
if (texture) {
glitz_texture_copy_surface (texture, src,
Index: glitz_pixel.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_pixel.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- glitz_pixel.c 6 Oct 2004 18:21:48 -0000 1.11
+++ glitz_pixel.c 20 Oct 2004 23:03:36 -0000 1.12
@@ -680,6 +680,12 @@
x_src += src->texture.box.x1;
y_src += src->texture.box.y1;
}
+
+ if (src->format->doublebuffer)
+ gl->read_buffer (src->read_buffer);
+
+ gl->scissor (0, 0, src->width, src->height);
+
gl->read_pixels (x_src, src->height - y_src - height,
width, height,
gl_format->format, gl_format->type,
@@ -698,8 +704,8 @@
src_image.data = data + src_y * bytes_per_line;
src_image.format = &gl_format->pixel;
- src_image.width = src->width;
- src_image.height = src->height;
+ src_image.width = src_w;
+ src_image.height = src_h;
if (format->bytes_per_line)
stride = format->bytes_per_line;
More information about the cairo-commit
mailing list