summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/shade.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-01-12 17:30:59 +0000
committerRobin Watts <robin.watts@artifex.com>2016-01-13 12:32:58 +0000
commitad8936bf2bcf54c7042bdec20c49c96657649b34 (patch)
tree0d6e309f5747e493632b72b34acef1e53e1ed9d7 /include/mupdf/fitz/shade.h
parent881b7ea89588677e709aaa7d3d0ffe4aed63822a (diff)
downloadmupdf-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 'include/mupdf/fitz/shade.h')
-rw-r--r--include/mupdf/fitz/shade.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/mupdf/fitz/shade.h b/include/mupdf/fitz/shade.h
index 56adea5b..ada969cd 100644
--- a/include/mupdf/fitz/shade.h
+++ b/include/mupdf/fitz/shade.h
@@ -72,12 +72,12 @@ struct fz_shade_s
fz_compressed_buffer *buffer;
};
-fz_shade *fz_keep_shade(fz_context *ctx, fz_shade *shade);
-void fz_drop_shade(fz_context *ctx, fz_shade *shade);
+fz_shade *fz_keep_shade(fz_context *ctx, const fz_shade *shade);
+void fz_drop_shade(fz_context *ctx, const fz_shade *shade);
void fz_drop_shade_imp(fz_context *ctx, fz_storable *shade);
-fz_rect *fz_bound_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_rect *r);
-void fz_paint_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_pixmap *dest, const fz_irect *bbox);
+fz_rect *fz_bound_shade(fz_context *ctx, const fz_shade *shade, const fz_matrix *ctm, fz_rect *r);
+void fz_paint_shade(fz_context *ctx, const fz_shade *shade, const fz_matrix *ctm, fz_pixmap *dest, const fz_irect *bbox);
/*
* Handy routine for processing mesh based shades
@@ -93,7 +93,7 @@ struct fz_vertex_s
typedef void (fz_mesh_prepare_fn)(fz_context *ctx, void *arg, fz_vertex *v, const float *c);
typedef void (fz_mesh_process_fn)(fz_context *ctx, void *arg, fz_vertex *av, fz_vertex *bv, fz_vertex *cv);
-void fz_process_mesh(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm,
+void fz_process_mesh(fz_context *ctx, const fz_shade *shade, const fz_matrix *ctm,
fz_mesh_prepare_fn *prepare, fz_mesh_process_fn *process, void *process_arg);
void fz_print_shade(fz_context *ctx, fz_output *out, fz_shade *shade);