From f84a189d5f94250e46d2cbd1a75aba00130e2dd6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 21 Jan 2015 16:42:45 +0100 Subject: Add ctx parameter and remove embedded contexts for API regularity. Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap. --- include/mupdf/fitz/shade.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'include/mupdf/fitz/shade.h') diff --git a/include/mupdf/fitz/shade.h b/include/mupdf/fitz/shade.h index aa7061b9..55e8767b 100644 --- a/include/mupdf/fitz/shade.h +++ b/include/mupdf/fitz/shade.h @@ -90,19 +90,8 @@ struct fz_vertex_s float c[FZ_MAX_COLORS]; }; -typedef struct fz_mesh_processor_s fz_mesh_processor; - -typedef void (fz_mesh_prepare_fn)(void *arg, fz_vertex *v, const float *c); -typedef void (fz_mesh_process_fn)(void *arg, fz_vertex *av, fz_vertex *bv, fz_vertex *cv); - -struct fz_mesh_processor_s { - fz_context *ctx; - fz_shade *shade; - fz_mesh_prepare_fn *prepare; - fz_mesh_process_fn *process; - void *process_arg; - int ncomp; -}; +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, fz_mesh_prepare_fn *prepare, fz_mesh_process_fn *process, void *process_arg); -- cgit v1.2.3