[cairo-commit] glitz/src glitz_pixel.c, 1.16, 1.17 glitz_texture.c, 1.17, 1.18

David Reveman commit at pdx.freedesktop.org
Mon Mar 7 23:25:10 PST 2005


Committed by: davidr

Update of /cvs/cairo/glitz/src
In directory gabe:/tmp/cvs-serv8807/src

Modified Files:
	glitz_pixel.c glitz_texture.c 
Log Message:
Fix glitz_set_pixels and initialization of plane equation for TexGen

Index: glitz_pixel.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_pixel.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- glitz_pixel.c	1 Mar 2005 15:43:25 -0000	1.16
+++ glitz_pixel.c	8 Mar 2005 07:25:08 -0000	1.17
@@ -780,11 +780,9 @@
                     dst_image.data = pixels = data;
                     dst_image.format = &gl_format->pixel;
 
-                    src_image.data =
+                    ptr =
                         glitz_buffer_map (buffer,
                                           GLITZ_BUFFER_ACCESS_READ_ONLY);
-                    src_image.data +=
-                        format->skip_lines * format->bytes_per_line;
                     src_image.format = format;
 
                     gl->pixel_store_i (GLITZ_GL_UNPACK_ALIGNMENT, 4);
@@ -797,11 +795,13 @@
                 src_image.width  = box.x2 - box.x1;
                 src_image.height = box.y2 - box.y1;
 
+                src_image.data = ptr + (format->skip_lines + box.y1 - y_dst) *
+                    format->bytes_per_line;
+
                 _glitz_pixel_transform (transform,
                                         &src_image,
                                         &dst_image,
-                                        format->xoffset + box.x1 - x_dst,
-                                        box.y1 - y_dst,
+                                        format->xoffset + box.x1 - x_dst, 0,
                                         0, 0,
                                         box.x2 - box.x1, box.y2 - box.y1);
             }
@@ -851,6 +851,7 @@
                                   GLITZ_DAMAGE_DRAWABLE_MASK |
                                   GLITZ_DAMAGE_SOLID_MASK);
         }
+        clip++;
     }
 
     if (transform)

Index: glitz_texture.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_texture.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- glitz_texture.c	25 Jan 2005 19:50:26 -0000	1.17
+++ glitz_texture.c	8 Mar 2005 07:25:08 -0000	1.18
@@ -293,7 +293,7 @@
 
     if (flags & GLITZ_SURFACE_FLAG_GEN_T_COORDS_MASK)
     {
-        plane.v[0] = 0.0f;
+        plane.v[0] = plane.v[2] = 0.0f;
         if (flags & GLITZ_SURFACE_FLAG_EYE_COORDS_MASK)
         {
             plane.v[1] = 1.0f;




More information about the cairo-commit mailing list