[cairo-commit] src/cairo-glitz-surface.c
ç½æ¶å Jinghua Luo
jinghua at kemper.freedesktop.org
Sun Dec 24 02:32:20 PST 2006
src/cairo-glitz-surface.c | 31 +++++++++++++++++++++++--------
1 files changed, 23 insertions(+), 8 deletions(-)
New commits:
diff-tree 2d30161e8922e66b276341810c21ce1b740f6699 (from 8fd7328ebb77b0a641cf30bded85e482ea63ad97)
Author: Jinghua Luo <sunmoon1997 at gmail.com>
Date: Sun Dec 24 18:31:02 2006 +0800
glitz: fix all compiler warnings in glitz backend.
diff --git a/src/cairo-glitz-surface.c b/src/cairo-glitz-surface.c
index c8e02c9..f5ca503 100644
--- a/src/cairo-glitz-surface.c
+++ b/src/cairo-glitz-surface.c
@@ -262,16 +262,17 @@ _cairo_glitz_surface_set_image (void
glitz_buffer_t *buffer;
glitz_pixel_format_t pf;
pixman_format_t *format;
- int am, rm, gm, bm;
+ unsigned int bpp, am, rm, gm, bm;
char *data;
format = pixman_image_get_format (image->pixman_image);
if (!format)
return CAIRO_STATUS_NO_MEMORY;
- pixman_format_get_masks (format, &pf.masks.bpp, &am, &rm, &gm, &bm);
+ pixman_format_get_masks (format, &bpp, &am, &rm, &gm, &bm);
pf.fourcc = GLITZ_FOURCC_RGB;
+ pf.masks.bpp = bpp;
pf.masks.alpha_mask = am;
pf.masks.red_mask = rm;
pf.masks.green_mask = gm;
@@ -591,7 +592,7 @@ _cairo_glitz_pattern_acquire_surface (ca
glitz_fixed16_16_t *params;
int n_params;
unsigned int *pixels;
- int i, n_base_params;
+ unsigned int i, n_base_params;
glitz_buffer_t *buffer;
static glitz_pixel_format_t format = {
GLITZ_FOURCC_RGB,
@@ -715,6 +716,8 @@ _cairo_glitz_pattern_acquire_surface (ca
attr->base.x_offset = 0;
attr->base.y_offset = 0;
} break;
+ case CAIRO_PATTERN_TYPE_SOLID:
+ case CAIRO_PATTERN_TYPE_SURFACE:
default:
break;
}
@@ -756,6 +759,7 @@ _cairo_glitz_pattern_acquire_surface (ca
case CAIRO_FILTER_GOOD:
case CAIRO_FILTER_BEST:
case CAIRO_FILTER_BILINEAR:
+ case CAIRO_FILTER_GAUSSIAN:
default:
attr->filter = GLITZ_FILTER_BILINEAR;
break;
@@ -977,10 +981,20 @@ _cairo_glitz_surface_fill_rectangles (vo
glitz_set_rectangles (dst->surface, &glitz_color,
(glitz_rectangle_t *) rects, n_rects);
} break;
+ case CAIRO_OPERATOR_SATURATE:
+ return CAIRO_INT_STATUS_UNSUPPORTED;
+ case CAIRO_OPERATOR_OVER:
+ case CAIRO_OPERATOR_IN:
+ case CAIRO_OPERATOR_OUT:
+ case CAIRO_OPERATOR_ATOP:
+ case CAIRO_OPERATOR_DEST:
+ case CAIRO_OPERATOR_DEST_OVER:
+ case CAIRO_OPERATOR_DEST_IN:
+ case CAIRO_OPERATOR_DEST_OUT:
+ case CAIRO_OPERATOR_DEST_ATOP:
+ case CAIRO_OPERATOR_XOR:
+ case CAIRO_OPERATOR_ADD:
default:
- if (op == CAIRO_OPERATOR_SATURATE)
- return CAIRO_INT_STATUS_UNSUPPORTED;
-
if (_glitz_ensure_target (dst->surface))
return CAIRO_INT_STATUS_UNSUPPORTED;
@@ -1799,7 +1813,7 @@ _cairo_glitz_surface_add_glyph (cairo_gl
glitz_pixel_format_t pf;
glitz_buffer_t *buffer;
pixman_format_t *format;
- int am, rm, gm, bm;
+ unsigned int bpp, am, rm, gm, bm;
cairo_int_status_t status;
glyph_private = scaled_glyph->surface_private;
@@ -1858,9 +1872,10 @@ _cairo_glitz_surface_add_glyph (cairo_gl
return CAIRO_STATUS_NO_MEMORY;
}
- pixman_format_get_masks (format, &pf.masks.bpp, &am, &rm, &gm, &bm);
+ pixman_format_get_masks (format, &bpp, &am, &rm, &gm, &bm);
pf.fourcc = GLITZ_FOURCC_RGB;
+ pf.masks.bpp = bpp;
pf.masks.alpha_mask = am;
pf.masks.red_mask = rm;
pf.masks.green_mask = gm;
More information about the cairo-commit
mailing list