summaryrefslogtreecommitdiff
path: root/fitz/fitz-internal.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-12-03 15:58:57 +0000
committerRobin Watts <robin.watts@artifex.com>2012-12-09 07:25:41 -0800
commit0236c79d8db96ce4598742b0211f9aa58269f819 (patch)
tree7a7c342a073ee9ebd88a3bbdb20f75cbe2bc0fa6 /fitz/fitz-internal.h
parent519087f4f29aad524c9e12c64946cb242a05a5a9 (diff)
downloadmupdf-0236c79d8db96ce4598742b0211f9aa58269f819.tar.xz
Rejig color conversion.
Add a mechanism for getting a color converter function. Implement the 'convert a single color' call in terms of that. 'Bulk' users can then repeatedly call the single function.
Diffstat (limited to 'fitz/fitz-internal.h')
-rw-r--r--fitz/fitz-internal.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/fitz/fitz-internal.h b/fitz/fitz-internal.h
index 569fc694..c90474dd 100644
--- a/fitz/fitz-internal.h
+++ b/fitz/fitz-internal.h
@@ -984,6 +984,22 @@ void fz_free_colorspace_imp(fz_context *ctx, fz_storable *colorspace);
void fz_convert_color(fz_context *ctx, fz_colorspace *dsts, float *dstv, fz_colorspace *srcs, float *srcv);
+typedef struct fz_color_converter_s fz_color_converter;
+
+/* This structure is public because it allows us to avoid dynamic allocations.
+ * Callers should only rely on the convert entry - the rest of the structure
+ * is subject to change without notice.
+ */
+struct fz_color_converter_s
+{
+ void (*convert)(fz_color_converter *, float *, float *);
+ fz_context *ctx;
+ fz_colorspace *ds;
+ fz_colorspace *ss;
+};
+
+void fz_find_color_converter(fz_color_converter *cc, fz_context *ctx, fz_colorspace *ds, fz_colorspace *ss);
+
/*
* Fonts come in two variants:
* Regular fonts are handled by FreeType.