[cairo-commit] cairo/src cairo_glitz_surface.c,1.4,1.5
David Reveman
commit at pdx.freedesktop.org
Sun Sep 12 15:34:02 PDT 2004
- Previous message: [cairo-commit] cairo ChangeLog,1.227,1.228
- Next message: [cairo-commit] glitz/src glitz.c, 1.24, 1.25 glitz.h, 1.21,
1.22 glitz_agl_extension.c, 1.10, 1.11 glitz_agl_info.c, 1.12,
1.13 glitz_compose.c, 1.6, 1.7 glitz_gl.h, 1.9,
1.10 glitz_glx_context.c, 1.13, 1.14 glitz_glx_extension.c,
1.13, 1.14 glitz_glx_info.c, 1.18, 1.19 glitzint.h, 1.27, 1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: davidr
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv19929/src
Modified Files:
cairo_glitz_surface.c
Log Message:
Get pixel masks from pixman image format
Index: cairo_glitz_surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo_glitz_surface.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** cairo_glitz_surface.c 12 Sep 2004 12:09:32 -0000 1.4
--- cairo_glitz_surface.c 12 Sep 2004 22:34:00 -0000 1.5
***************
*** 192,213 ****
glitz_buffer_t *buffer;
glitz_pixel_format_t pf;
! if (image->depth > 8) {
! pf.masks.bpp = 32;
!
! if (surface->format->alpha_size)
! pf.masks.alpha_mask = 0xff000000;
! else
! pf.masks.alpha_mask = 0x0;
!
! pf.masks.red_mask = 0xff0000;
! pf.masks.green_mask = 0xff00;
! pf.masks.blue_mask = 0xff;
! } else {
! pf.masks.bpp = 8;
! pf.masks.alpha_mask = 0xff;
! pf.masks.red_mask = pf.masks.green_mask = pf.masks.blue_mask = 0x0;
! }
pf.xoffset = 0;
pf.skip_lines = 0;
--- 192,208 ----
glitz_buffer_t *buffer;
glitz_pixel_format_t pf;
+ pixman_format_t *format;
+ int am, rm, gm, bm;
+
+ format = pixman_image_get_format (image->pixman_image);
+ if (format == NULL)
+ return CAIRO_STATUS_NO_MEMORY;
! pixman_format_get_masks (format, &pf.masks.bpp, &am, &rm, &gm, &bm);
+ pf.masks.alpha_mask = am;
+ pf.masks.red_mask = rm;
+ pf.masks.green_mask = gm;
+ pf.masks.blue_mask = bm;
pf.xoffset = 0;
pf.skip_lines = 0;
- Previous message: [cairo-commit] cairo ChangeLog,1.227,1.228
- Next message: [cairo-commit] glitz/src glitz.c, 1.24, 1.25 glitz.h, 1.21,
1.22 glitz_agl_extension.c, 1.10, 1.11 glitz_agl_info.c, 1.12,
1.13 glitz_compose.c, 1.6, 1.7 glitz_gl.h, 1.9,
1.10 glitz_glx_context.c, 1.13, 1.14 glitz_glx_extension.c,
1.13, 1.14 glitz_glx_info.c, 1.18, 1.19 glitzint.h, 1.27, 1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list