[cairo-commit] cairo/pixman/src icrect.c,1.15,1.16
Billy Biggs
commit at pdx.freedesktop.org
Wed Aug 10 22:03:02 PDT 2005
Committed by: vektor
Update of /cvs/cairo/cairo/pixman/src
In directory gabe:/tmp/cvs-serv21675/src
Modified Files:
icrect.c
Log Message:
* src/icrect.c: (pixman_fill_rect_1bpp), (pixman_color_rects):
Add support for filling 1bpp images (used to clear A1 masks).
Index: icrect.c
===================================================================
RCS file: /cvs/cairo/cairo/pixman/src/icrect.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- icrect.c 25 Jun 2005 03:13:19 -0000 1.15
+++ icrect.c 11 Aug 2005 05:03:00 -0000 1.16
@@ -31,6 +31,25 @@
static void
+pixman_fill_rect_1bpp (pixman_image_t *dst,
+ int16_t xDst,
+ int16_t yDst,
+ uint16_t width,
+ uint16_t height,
+ pixman_bits_t *pixel)
+{
+ char value = *pixel ? 0xff : 0;
+ char *line;
+
+ line = (char *)dst->pixels->data +
+ xDst + yDst * dst->pixels->stride;
+ while (height-- > 0) {
+ memset (line, value, (width + 7) / 8);
+ line += dst->pixels->stride;
+ }
+}
+
+static void
pixman_fill_rect_8bpp (pixman_image_t *dst,
int16_t xDst,
int16_t yDst,
@@ -174,6 +193,8 @@
func = pixman_fill_rect_8bpp;
else if (dst->pixels->bpp == 32)
func = pixman_fill_rect_32bpp;
+ else if (dst->pixels->bpp == 1)
+ func = pixman_fill_rect_1bpp;
else
func = pixman_fill_rect_general;
More information about the cairo-commit
mailing list