diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-11-09 13:46:47 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-11-09 13:49:45 +0100 |
commit | d883775f690ec9e6f89a1ae16cb7d9c2e7a15897 (patch) | |
tree | edc09cec60e32b26dc1a90c8c93b05f1339e0800 | |
parent | 26d5bb0eccb05de7d34056d63802736301f31b9c (diff) |
xml: Fix backend structure
The xml backend structure was being initialized with the wrong
functions, resulting in multiple "initialization from incompatible
pointer type" warnings.
-rw-r--r-- | src/cairo-xml-surface.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/src/cairo-xml-surface.c b/src/cairo-xml-surface.c index 40b6160a6..dd9d3f6f9 100644 --- a/src/cairo-xml-surface.c +++ b/src/cairo-xml-surface.c @@ -953,8 +953,7 @@ _cairo_xml_surface_glyphs (void *abstract_surface, cairo_glyph_t *glyphs, int num_glyphs, cairo_scaled_font_t *scaled_font, - const cairo_clip_t *clip, - int *remaining_glyphs) + const cairo_clip_t *clip) { cairo_xml_surface_t *surface = abstract_surface; cairo_xml_t *xml = to_xml (surface); @@ -988,7 +987,6 @@ _cairo_xml_surface_glyphs (void *abstract_surface, _cairo_xml_indent (xml, -2); _cairo_xml_printf (xml, "</glyphs>"); - *remaining_glyphs = 0; return CAIRO_STATUS_SUCCESS; } @@ -996,6 +994,7 @@ static const cairo_surface_backend_t _cairo_xml_surface_backend = { CAIRO_SURFACE_TYPE_XML, NULL, + _cairo_default_context_create, _cairo_xml_surface_create_similar, @@ -1003,39 +1002,25 @@ _cairo_xml_surface_backend = { NULL, /* map_to_image */ NULL, /* unmap_image */ - NULL, NULL, /* source image */ - NULL, NULL, /* dst image */ - NULL, /* clone_similar */ - NULL, /* composite */ - NULL, /* fill_rectangles */ - NULL, /* composite_trapezoids */ - NULL, /* create_span_renderer */ - NULL, /* check_span_renderer */ - NULL, NULL, /* copy/show page */ + NULL, /* acquire source image */ + NULL, /* release source image */ + NULL, /* snapshot */ + + NULL, /* copy page */ + NULL, /* show page */ + _cairo_xml_surface_get_extents, - NULL, /* old_show_glyphs */ NULL, /* get_font_options */ + NULL, /* flush */ NULL, /* mark_dirty_rectangle */ - NULL, /* font fini */ - NULL, /* scaled_glyph_fini */ - /* The 5 high level operations */ _cairo_xml_surface_paint, _cairo_xml_surface_mask, _cairo_xml_surface_stroke, _cairo_xml_surface_fill, - _cairo_xml_surface_glyphs, - - NULL, /* snapshot */ - - NULL, /* is_similar */ NULL, /* fill_stroke */ - NULL, /* create_solid_pattern_surface */ - NULL, /* can_repaint_solid_pattern_surface */ - - /* The alternate high-level text operation */ - NULL, NULL, /* has, show_text_glyphs */ + _cairo_xml_surface_glyphs, }; static cairo_surface_t * |