summaryrefslogtreecommitdiff
path: root/src/test-paginated-surface.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2008-05-23 19:57:48 -0400
committerBehdad Esfahbod <behdad@behdad.org>2008-05-23 20:03:49 -0400
commitcf473f4a75ca0d3c815222287d7c144e72de5add (patch)
tree7c81324102f4fbaa87c06ed9809dc43b1873501c /src/test-paginated-surface.c
parente66e198ab04f2e19093aad4ed9f9c24e2756b8a7 (diff)
downloadcairo-cf473f4a75ca0d3c815222287d7c144e72de5add.tar.gz
[cairo-xlib] Fix show_glyphs when failing to upload a glyph
Originally reported here: http://lists.cairographics.org/archives/cairo/2008-May/014032.html and analyized later in the thread. Change (font and surface) backend show_glyphs() API to take a int *remaining_glyphs argument. It's used to communicate to the caller, by way of setting remaining_glyphs and returning INT_STATUS_UNSUPPORTED, that some of the glyphs were shown but not the others. The xlib backend now correctly uses this to handle failure to upload a glyph to the server. So the large-font test passes now. An alternative approach could be to add some public value for glyphs indices that are not shown. -1 perhaps (the xlib backend already uses that value internally). Then instead of remaining_glyphs, a backend could simply set glyph indices of glyphs shown to that -1 value.
Diffstat (limited to 'src/test-paginated-surface.c')
-rw-r--r--src/test-paginated-surface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test-paginated-surface.c b/src/test-paginated-surface.c
index f7cc4db6d..6b85a1323 100644
--- a/src/test-paginated-surface.c
+++ b/src/test-paginated-surface.c
@@ -238,7 +238,8 @@ _test_paginated_surface_show_glyphs (void *abstract_surface,
cairo_pattern_t *source,
cairo_glyph_t *glyphs,
int num_glyphs,
- cairo_scaled_font_t *scaled_font)
+ cairo_scaled_font_t *scaled_font,
+ int *remaining_glyphs)
{
test_paginated_surface_t *surface = abstract_surface;
cairo_int_status_t status;