[cairo-commit] glitz/src glitz.c, 1.14, 1.15 glitz_agl_surface.c,
1.9, 1.10 glitz_glx_surface.c, 1.11, 1.12 glitz_texture.c, 1.6,
1.7 glitzint.h, 1.15, 1.16
David Reveman
commit at pdx.freedesktop.org
Sun May 30 08:59:57 PDT 2004
Committed by: davidr
Update of /cvs/cairo/glitz/src
In directory pdx:/tmp/cvs-serv22594/src
Modified Files:
glitz.c glitz_agl_surface.c glitz_glx_surface.c
glitz_texture.c glitzint.h
Log Message:
Updated glitz_texture_copy_surface
Index: glitz.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** a/glitz.c 30 May 2004 12:40:48 -0000 1.14
--- b/glitz.c 30 May 2004 15:59:54 -0000 1.15
***************
*** 842,846 ****
{
glitz_gl_proc_address_list_t *gl;
- glitz_bounding_box_t box;
int status;
--- 842,845 ----
***************
*** 881,889 ****
return;
- box.x1 = x_dst;
- box.y1 = y_dst;
- box.x2 = box.x1 + width;
- box.y2 = box.y1 + height;
-
gl = dst->gl;
--- 880,883 ----
***************
*** 891,894 ****
--- 885,890 ----
if (glitz_surface_try_push_current (dst,
GLITZ_CN_SURFACE_DRAWABLE_CURRENT)) {
+ glitz_bounding_box_t box;
+
if (src != dst)
status = glitz_surface_make_current_read (src);
***************
*** 954,957 ****
--- 950,958 ----
}
+ box.x1 = x_dst;
+ box.y1 = y_dst;
+ box.x2 = box.x1 + width;
+ box.y2 = box.y1 + height;
+
glitz_surface_dirty (dst, &box);
glitz_surface_pop_current (dst);
***************
*** 963,967 ****
if (glitz_surface_try_push_current (src,
GLITZ_CN_SURFACE_DRAWABLE_CURRENT)) {
! glitz_texture_copy_surface (&dst->texture, src, &box, x_src, y_src);
status = 1;
}
--- 964,969 ----
if (glitz_surface_try_push_current (src,
GLITZ_CN_SURFACE_DRAWABLE_CURRENT)) {
! glitz_texture_copy_surface (&dst->texture, src,
! x_src, y_src, width, height, x_dst, y_dst);
status = 1;
}
Index: glitz_agl_surface.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_agl_surface.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** a/glitz_agl_surface.c 24 May 2004 07:16:42 -0000 1.9
--- b/glitz_agl_surface.c 30 May 2004 15:59:54 -0000 1.10
***************
*** 120,128 ****
return &surface->base.texture;
! } else
glitz_texture_copy_surface (&surface->base.texture, &surface->base,
! &surface->base.dirty_box,
! surface->base.dirty_box.x1,
! surface->base.dirty_box.y1);
surface->base.hint_mask &= ~GLITZ_INT_HINT_DIRTY_MASK;
--- 120,139 ----
return &surface->base.texture;
! } else {
! glitz_bounding_box_t copy_box;
!
! copy_box.x1 = copy_box.y1 = 0;
! copy_box.x2 = surface->base.width;
! copy_box.y2 = surface->base.height;
! glitz_intersect_bounding_box (&surface->base.dirty_box,
! ©_box, ©_box);
glitz_texture_copy_surface (&surface->base.texture, &surface->base,
! copy_box.x1,
! copy_box.y1,
! copy_box.x2 - copy_box.x1,
! copy_box.y2 - copy_box.y1,
! copy_box.x1,
! copy_box.y1);
! }
surface->base.hint_mask &= ~GLITZ_INT_HINT_DIRTY_MASK;
Index: glitz_glx_surface.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_glx_surface.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** a/glitz_glx_surface.c 24 May 2004 07:16:42 -0000 1.11
--- b/glitz_glx_surface.c 30 May 2004 15:59:54 -0000 1.12
***************
*** 144,151 ****
if (surface->base.hint_mask & GLITZ_INT_HINT_DIRTY_MASK) {
glitz_texture_copy_surface (&surface->base.texture, &surface->base,
! &surface->base.dirty_box,
! surface->base.dirty_box.x1,
! surface->base.dirty_box.y1);
surface->base.hint_mask &= ~GLITZ_INT_HINT_DIRTY_MASK;
}
--- 144,161 ----
if (surface->base.hint_mask & GLITZ_INT_HINT_DIRTY_MASK) {
+ glitz_bounding_box_t copy_box;
+
+ copy_box.x1 = copy_box.y1 = 0;
+ copy_box.x2 = surface->base.width;
+ copy_box.y2 = surface->base.height;
+ glitz_intersect_bounding_box (&surface->base.dirty_box,
+ ©_box, ©_box);
glitz_texture_copy_surface (&surface->base.texture, &surface->base,
! copy_box.x1,
! copy_box.y1,
! copy_box.x2 - copy_box.x1,
! copy_box.y2 - copy_box.y1,
! copy_box.x1,
! copy_box.y1);
surface->base.hint_mask &= ~GLITZ_INT_HINT_DIRTY_MASK;
}
Index: glitz_texture.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_texture.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** a/glitz_texture.c 18 May 2004 15:01:50 -0000 1.6
--- b/glitz_texture.c 30 May 2004 15:59:54 -0000 1.7
***************
*** 214,222 ****
glitz_texture_copy_surface (glitz_texture_t *texture,
glitz_surface_t *surface,
! glitz_bounding_box_t *box,
! int x_src,
! int y_src)
{
! int x_dst, y_dst, width, height;
glitz_surface_push_current (surface, GLITZ_CN_SURFACE_DRAWABLE_CURRENT);
--- 214,225 ----
glitz_texture_copy_surface (glitz_texture_t *texture,
glitz_surface_t *surface,
! int x_surface,
! int y_surface,
! int width,
! int height,
! int x_texture,
! int y_texture)
{
! int tex_height;
glitz_surface_push_current (surface, GLITZ_CN_SURFACE_DRAWABLE_CURRENT);
***************
*** 227,246 ****
_glitz_texture_allocate (surface->gl, texture);
- if (x_src < 0) x_src = 0;
- if (y_src < 0) y_src = 0;
-
- x_dst = (box->x1 > 0)? box->x1: 0;
- y_dst = (box->y1 > 0)? box->y1: 0;
- width = (box->x2 < (int) texture->width)?
- box->x2 - x_dst: (int) texture->width - x_dst;
- height = (box->x2 < (int) texture->height)?
- box->y2 - y_dst: (int) texture->height - y_dst;
-
if (surface->format->doublebuffer)
surface->gl->read_buffer (surface->read_buffer);
surface->gl->copy_tex_sub_image_2d (texture->target, 0,
! x_dst, y_dst,
! x_src, y_src,
width, height);
--- 230,246 ----
_glitz_texture_allocate (surface->gl, texture);
if (surface->format->doublebuffer)
surface->gl->read_buffer (surface->read_buffer);
+
+ if (texture->target == GLITZ_GL_TEXTURE_2D)
+ tex_height = (int) ((double) texture->height * texture->texcoord_height);
+ else
+ tex_height = (int) texture->texcoord_height;
surface->gl->copy_tex_sub_image_2d (texture->target, 0,
! x_texture,
! tex_height - y_texture - height,
! x_surface,
! surface->height - y_surface - height,
width, height);
Index: glitzint.h
===================================================================
RCS file: /cvs/cairo/glitz/src/glitzint.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** a/glitzint.h 24 May 2004 07:16:42 -0000 1.15
--- b/glitzint.h 30 May 2004 15:59:54 -0000 1.16
***************
*** 492,498 ****
glitz_texture_copy_surface (glitz_texture_t *texture,
glitz_surface_t *surface,
! glitz_bounding_box_t *box,
! int x_src,
! int y_src);
void
--- 492,501 ----
glitz_texture_copy_surface (glitz_texture_t *texture,
glitz_surface_t *surface,
! int x_surface,
! int y_surface,
! int width,
! int height,
! int x_texture,
! int y_texture);
void
More information about the cairo-commit
mailing list