[cairo-commit] libpixman/src icformat.c,1.12,1.13

Owen Taylor commit at pdx.freedesktop.org
Fri Mar 11 12:09:02 PST 2005


Committed by: otaylor

Update of /cvs/cairo/libpixman/src
In directory gabe:/tmp/cvs-serv27108/src

Modified Files:
	icformat.c 
Log Message:
2005-03-11  Owen Taylor  <otaylor at redhat.com>

        * src/icformat.c (pixman_format_init): Set format->depth
        correctly instead of just using the bpp.


Index: icformat.c
===================================================================
RCS file: /cvs/cairo/libpixman/src/icformat.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- icformat.c	2 Mar 2005 15:43:33 -0000	1.12
+++ icformat.c	11 Mar 2005 20:09:00 -0000	1.13
@@ -99,7 +99,6 @@
     format->id = FakeClientID (0);
 */
     format->format_code = format_code;
-    format->depth = PICT_FORMAT_BPP(format_code);
 
     switch (PICT_FORMAT_TYPE(format_code)) {
     case PICT_TYPE_ARGB:
@@ -148,6 +147,11 @@
 	/* remaining fields already set to zero */
 	break;
     }
+
+    format->depth = _IcOnes ((format->alphaMask << format->alpha) |
+			     (format->redMask << format->red) |
+			     (format->blueMask << format->blue) |
+			     (format->greenMask << format->green));
 }
 slim_hidden_def(pixman_format_init);
 




More information about the cairo-commit mailing list