diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-01-12 17:30:59 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-01-13 12:32:58 +0000 |
commit | ad8936bf2bcf54c7042bdec20c49c96657649b34 (patch) | |
tree | 0d6e309f5747e493632b72b34acef1e53e1ed9d7 /source/fitz/draw-glyph.c | |
parent | 881b7ea89588677e709aaa7d3d0ffe4aed63822a (diff) | |
download | mupdf-ad8936bf2bcf54c7042bdec20c49c96657649b34.tar.xz |
Add lots of consts.
In general, we should use 'const fz_blah' in device calls whenever
the callee should not alter the fz_blah.
Push this through. This shows up various places where we fz_keep
and fz_drop these const things.
I've updated the fz_keep and fz_drops with appropriate casts
to remove the consts. We may need to do the union dance to avoid
the consts for some compilers, but will only do that if required.
I think this is nicer overall, even allowing for the const<->no const
problems.
Diffstat (limited to 'source/fitz/draw-glyph.c')
-rw-r--r-- | source/fitz/draw-glyph.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/fitz/draw-glyph.c b/source/fitz/draw-glyph.c index e7f8af30..34489924 100644 --- a/source/fitz/draw-glyph.c +++ b/source/fitz/draw-glyph.c @@ -11,7 +11,7 @@ typedef struct fz_glyph_key_s fz_glyph_key; struct fz_glyph_key_s { - fz_font *font; + const fz_font *font; int a, b; int c, d; unsigned short gid; @@ -173,7 +173,7 @@ fz_subpixel_adjust(fz_context *ctx, fz_matrix *ctm, fz_matrix *subpix_ctm, unsig } fz_glyph * -fz_render_stroked_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *trm, const fz_matrix *ctm, fz_stroke_state *stroke, const fz_irect *scissor) +fz_render_stroked_glyph(fz_context *ctx, const fz_font *font, int gid, fz_matrix *trm, const fz_matrix *ctm, const fz_stroke_state *stroke, const fz_irect *scissor) { if (font->ft_face) { @@ -189,7 +189,7 @@ fz_render_stroked_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *trm, } fz_pixmap * -fz_render_stroked_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, fz_matrix *trm, const fz_matrix *ctm, fz_stroke_state *stroke, const fz_irect *scissor) +fz_render_stroked_glyph_pixmap(fz_context *ctx, const fz_font *font, int gid, fz_matrix *trm, const fz_matrix *ctm, const fz_stroke_state *stroke, const fz_irect *scissor) { if (font->ft_face) { @@ -241,7 +241,7 @@ move_to_front(fz_glyph_cache *cache, fz_glyph_cache_entry *entry) } fz_glyph * -fz_render_glyph(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colorspace *model, const fz_irect *scissor) +fz_render_glyph(fz_context *ctx, const fz_font *font, int gid, fz_matrix *ctm, fz_colorspace *model, const fz_irect *scissor) { fz_glyph_cache *cache; fz_glyph_key key; @@ -407,7 +407,7 @@ unlock_and_return_val: } fz_pixmap * -fz_render_glyph_pixmap(fz_context *ctx, fz_font *font, int gid, fz_matrix *ctm, fz_colorspace *model, const fz_irect *scissor) +fz_render_glyph_pixmap(fz_context *ctx, const fz_font *font, int gid, fz_matrix *ctm, fz_colorspace *model, const fz_irect *scissor) { fz_pixmap *val; unsigned char qe, qf; |