diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2006-12-11 01:39:51 -0500 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2006-12-11 01:39:51 -0500 |
commit | 5a9642c5746fd677aed35ce620ce90b1029b1a0c (patch) | |
tree | 8b72cfdc3f1048ad582d4303558c9b67847a9c03 /src/cairo-surface.c | |
parent | 70695f5c62b89b417c1e8b42451470a5a8920bf3 (diff) |
Add/remove const to cairo_glyph_t* arguments consistently
The rule is: cairo_glyph_t* is always passed as const for measurement
purposes. This was not reflected in our public api previously. Fixed
Showing glyphs used to have cairo_glyph_t* always as const. With this
changed, it is only const on cairo_t and cairo_gstate_t operations.
cairo_surface_t, cairo_scaled_font_t, and individual backends receive
cairo_glyph_t* as non-const. The desired semantics is that they may modify
the contents of the array as long as they do not return
CAIRO_STATUS_UNSUPPORTED. This makes it possible to avoid copying the glyph
array again and again, and edit it in-place. Backends are in fact free to use
the array as a generic buffer as they see fit.
Diffstat (limited to 'src/cairo-surface.c')
-rw-r--r-- | src/cairo-surface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-surface.c b/src/cairo-surface.c index dfcf39d0a..669097142 100644 --- a/src/cairo-surface.c +++ b/src/cairo-surface.c @@ -1795,7 +1795,7 @@ cairo_status_t _cairo_surface_show_glyphs (cairo_surface_t *surface, cairo_operator_t op, cairo_pattern_t *source, - const cairo_glyph_t *glyphs, + cairo_glyph_t *glyphs, int num_glyphs, cairo_scaled_font_t *scaled_font) { @@ -1873,7 +1873,7 @@ _cairo_surface_old_show_glyphs (cairo_scaled_font_t *scaled_font, int dest_y, unsigned int width, unsigned int height, - const cairo_glyph_t *glyphs, + cairo_glyph_t *glyphs, int num_glyphs) { cairo_status_t status; |