[cairo-commit]
libpixman/src icformat.c, 1.10, 1.11 icimage.c, 1.22,
1.23 pixman.h, 1.14, 1.15
David Reveman
commit at pdx.freedesktop.org
Sun Sep 12 06:06:53 PDT 2004
Committed by: davidr
Update of /cvs/cairo/libpixman/src
In directory gabe:/tmp/cvs-serv19093/src
Modified Files:
icformat.c icimage.c pixman.h
Log Message:
Added pixman_format_get_masks and fixed a few format issues
Index: icformat.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icformat.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** icformat.c 16 Apr 2004 15:32:53 -0000 1.10
--- icformat.c 12 Sep 2004 13:06:50 -0000 1.11
***************
*** 94,97 ****
--- 94,99 ----
pixman_format_init (pixman_format_t *format, int format_code)
{
+ memset (format, 0, sizeof (pixman_format_t));
+
/* XXX: What do we want to lodge in here?
format->id = FakeClientID (0);
***************
*** 143,147 ****
format->alpha = 0;
format->alphaMask = Mask(PICT_FORMAT_A(format_code));
!
/* remaining fields already set to zero */
break;
--- 145,149 ----
format->alpha = 0;
format->alphaMask = Mask(PICT_FORMAT_A(format_code));
!
/* remaining fields already set to zero */
break;
***************
*** 155,156 ****
--- 157,189 ----
free (format);
}
+
+ void
+ pixman_format_get_masks (pixman_format_t *format,
+ int *bpp,
+ int *alpha_mask,
+ int *red_mask,
+ int *green_mask,
+ int *blue_mask)
+ {
+ *bpp = PICT_FORMAT_BPP (format->format_code);
+
+ if (format->alphaMask)
+ *alpha_mask = format->alphaMask << format->alpha;
+ else
+ *alpha_mask = 0;
+
+ if (format->redMask)
+ *red_mask = format->redMask << format->red;
+ else
+ *red_mask = 0;
+
+ if (format->greenMask)
+ *green_mask = format->greenMask << format->green;
+ else
+ *green_mask = 0;
+
+ if (format->blueMask)
+ *blue_mask = format->blueMask << format->blue;
+ else
+ *blue_mask = 0;
+ }
Index: icimage.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icimage.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** icimage.c 12 Sep 2004 02:55:24 -0000 1.22
--- icimage.c 12 Sep 2004 13:06:50 -0000 1.23
***************
*** 229,232 ****
--- 229,238 ----
}
+ pixman_format_t *
+ pixman_image_get_format (pixman_image_t *image)
+ {
+ return &image->image_format;
+ }
+
pixman_bits_t *
pixman_image_get_data (pixman_image_t *image)
Index: pixman.h
===================================================================
RCS file: /cvs/cairo/libpixman/src/pixman.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** pixman.h 12 Sep 2004 02:55:24 -0000 1.14
--- pixman.h 12 Sep 2004 13:06:50 -0000 1.15
***************
*** 240,243 ****
--- 240,251 ----
pixman_format_destroy (pixman_format_t *format);
+ void
+ pixman_format_get_masks (pixman_format_t *format,
+ int *bpp,
+ int *alpha_mask,
+ int *red_mask,
+ int *green_mask,
+ int *blue_mask);
+
/* icimage.c */
More information about the cairo-commit
mailing list