[cairo-commit] cairo/src cairo_xcb_surface.c,1.5,1.6

Keith Packard commit at pdx.freedesktop.org
Wed Jun 16 18:16:06 PDT 2004


Committed by: keithp

Update of /cvs/cairo/cairo/src
In directory pdx:/tmp/cvs-serv16932/src

Modified Files:
	cairo_xcb_surface.c 
Log Message:
2004-06-16  Keith Packard  <keithp at keithp.com>

	* src/cairo_xcb_surface.c: (bytes_per_line),
	(_cairo_xcb_surface_set_image):
	Fix image data length computation (XCB doesn't do this part).


Index: cairo_xcb_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_xcb_surface.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** cairo_xcb_surface.c	24 May 2004 09:28:05 -0000	1.5
--- cairo_xcb_surface.c	17 Jun 2004 01:16:04 -0000	1.6
***************
*** 316,320 ****
  {
      int bitmap_pad = XCBGetSetup(c)->bitmap_format_scanline_pad;
!     return (bpp * width + bitmap_pad - 1) & -bitmap_pad;
  }
  
--- 316,320 ----
  {
      int bitmap_pad = XCBGetSetup(c)->bitmap_format_scanline_pad;
!     return ((bpp * width + bitmap_pad - 1) & -bitmap_pad) >> 3;
  }
  
***************
*** 402,406 ****
      _cairo_xcb_surface_ensure_gc (surface);
      bpp = bits_per_pixel(surface->dpy, image->depth);
!     data_len = bytes_per_line(surface->dpy, surface->width, bpp) * surface->height;
      XCBPutImage(surface->dpy, ZPixmap, surface->drawable, surface->gc,
  	      image->width,
--- 402,406 ----
      _cairo_xcb_surface_ensure_gc (surface);
      bpp = bits_per_pixel(surface->dpy, image->depth);
!     data_len = bytes_per_line(surface->dpy, image->width, bpp) * image->height;
      XCBPutImage(surface->dpy, ZPixmap, surface->drawable, surface->gc,
  	      image->width,





More information about the cairo-commit mailing list