mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-04 15:40:24 +01:00
Trivial warning fixes to silence the compiler.
This commit is contained in:
parent
b235050316
commit
74c1e9b545
2 changed files with 63 additions and 18 deletions
|
|
@ -759,6 +759,50 @@ _return_success (void)
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/* These typedefs are just to silence the compiler... */
|
||||
typedef cairo_int_status_t
|
||||
(*_set_clip_region_func) (void *surface,
|
||||
cairo_region_t *region);
|
||||
typedef cairo_int_status_t
|
||||
(*_paint_func) (void *surface,
|
||||
cairo_operator_t op,
|
||||
cairo_pattern_t *source);
|
||||
|
||||
typedef cairo_int_status_t
|
||||
(*_mask_func) (void *surface,
|
||||
cairo_operator_t op,
|
||||
cairo_pattern_t *source,
|
||||
cairo_pattern_t *mask);
|
||||
|
||||
typedef cairo_int_status_t
|
||||
(*_stroke_func) (void *surface,
|
||||
cairo_operator_t op,
|
||||
cairo_pattern_t *source,
|
||||
cairo_path_fixed_t *path,
|
||||
cairo_stroke_style_t *style,
|
||||
cairo_matrix_t *ctm,
|
||||
cairo_matrix_t *ctm_inverse,
|
||||
double tolerance,
|
||||
cairo_antialias_t antialias);
|
||||
|
||||
typedef cairo_int_status_t
|
||||
(*_fill_func) (void *surface,
|
||||
cairo_operator_t op,
|
||||
cairo_pattern_t *source,
|
||||
cairo_path_fixed_t *path,
|
||||
cairo_fill_rule_t fill_rule,
|
||||
double tolerance,
|
||||
cairo_antialias_t antialias);
|
||||
|
||||
typedef cairo_int_status_t
|
||||
(*_show_glyphs_func) (void *surface,
|
||||
cairo_operator_t op,
|
||||
cairo_pattern_t *source,
|
||||
cairo_glyph_t *glyphs,
|
||||
int num_glyphs,
|
||||
cairo_scaled_font_t *scaled_font,
|
||||
int *remaining_glyphs);
|
||||
|
||||
static const cairo_surface_backend_t cairo_null_surface_backend = {
|
||||
CAIRO_INTERNAL_SURFACE_TYPE_NULL,
|
||||
|
||||
|
|
@ -774,7 +818,7 @@ static const cairo_surface_backend_t cairo_null_surface_backend = {
|
|||
NULL, /* composite_trapezoids */
|
||||
NULL, /* copy_page */
|
||||
NULL, /* show_page */
|
||||
_return_success, /* set_clip_region */
|
||||
(_set_clip_region_func) _return_success, /* set_clip_region */
|
||||
NULL, /* intersect_clip_path */
|
||||
NULL, /* get_extents */
|
||||
NULL, /* old_show_glyphs */
|
||||
|
|
@ -783,11 +827,11 @@ static const cairo_surface_backend_t cairo_null_surface_backend = {
|
|||
NULL, /* mark_dirty_rectangle */
|
||||
NULL, /* scaled_font_fini */
|
||||
NULL, /* scaled_glyph_fini */
|
||||
_return_success, /* paint */
|
||||
_return_success, /* mask */
|
||||
_return_success, /* stroke */
|
||||
_return_success, /* fill */
|
||||
_return_success, /* show_glyphs */
|
||||
(_paint_func) _return_success, /* paint */
|
||||
(_mask_func) _return_success, /* mask */
|
||||
(_stroke_func) _return_success, /* stroke */
|
||||
(_fill_func) _return_success, /* fill */
|
||||
(_show_glyphs_func) _return_success, /* show_glyphs */
|
||||
NULL /* snapshot */
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1616,14 +1616,14 @@ _cairo_xlib_surface_solid_fill_rectangles (cairo_xlib_surface_t *surface,
|
|||
cairo_rectangle_int_t *rects,
|
||||
int num_rects)
|
||||
{
|
||||
XGCValues gcv;
|
||||
GC xgc;
|
||||
XGCValues gcv;
|
||||
int a_width=0, r_width=0, g_width=0, b_width=0;
|
||||
int a_shift=0, r_shift=0, g_shift=0, b_shift=0;
|
||||
int a = color->alpha_short >> 8;
|
||||
int r = color->red_short >> 8;
|
||||
int r = color->red_short >> 8;
|
||||
int g = color->green_short >> 8;
|
||||
int b = color->blue_short >> 8;
|
||||
int b = color->blue_short >> 8;
|
||||
int i;
|
||||
|
||||
if (surface->visual->class == TrueColor) {
|
||||
|
|
@ -1651,9 +1651,8 @@ _cairo_xlib_surface_solid_fill_rectangles (cairo_xlib_surface_t *surface,
|
|||
_field_from_8 (b, 3, 0)];
|
||||
}
|
||||
|
||||
xgc = XCreateGC (surface->dpy, surface->drawable, GCForeground,
|
||||
&gcv);
|
||||
if (!xgc)
|
||||
xgc = XCreateGC (surface->dpy, surface->drawable, GCForeground, &gcv);
|
||||
if (xgc == NULL)
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
|
||||
for (i = 0; i < num_rects; i++) {
|
||||
|
|
@ -1661,7 +1660,7 @@ _cairo_xlib_surface_solid_fill_rectangles (cairo_xlib_surface_t *surface,
|
|||
rects[i].x, rects[i].y,
|
||||
rects[i].width, rects[i].height);
|
||||
}
|
||||
XFreeGC(surface->dpy, xgc);
|
||||
XFreeGC (surface->dpy, xgc);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -1681,13 +1680,15 @@ _cairo_xlib_surface_fill_rectangles (void *abstract_surface,
|
|||
|
||||
_cairo_xlib_display_notify (surface->screen_info->display);
|
||||
|
||||
if (!CAIRO_SURFACE_RENDER_HAS_FILL_RECTANGLE (surface)) {
|
||||
if (! CAIRO_SURFACE_RENDER_HAS_FILL_RECTANGLE (surface)) {
|
||||
if (op == CAIRO_OPERATOR_CLEAR ||
|
||||
((op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_OVER) &&
|
||||
CAIRO_COLOR_IS_OPAQUE(color))) {
|
||||
return _cairo_xlib_surface_solid_fill_rectangles(surface, color,
|
||||
rects, num_rects);
|
||||
((op == CAIRO_OPERATOR_SOURCE || op == CAIRO_OPERATOR_OVER) &&
|
||||
CAIRO_COLOR_IS_OPAQUE (color)))
|
||||
{
|
||||
return _cairo_xlib_surface_solid_fill_rectangles (surface, color,
|
||||
rects, num_rects);
|
||||
}
|
||||
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue