diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-03-03 19:42:29 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-03-07 17:37:50 +0000 |
commit | 64f5d62c80176085335d84c24e02cd49d9e032b9 (patch) | |
tree | caeda4721481aacecbec1fcbd745bc9d4fea3c89 /base/gsicc.c | |
parent | ddd39cb2ea1773bf001cd4f975856446c2bd7f43 (diff) | |
download | ghostpdl-64f5d62c80176085335d84c24e02cd49d9e032b9.tar.gz |
Bug 697545: Extend "separable_and_linear" processing.
First, avoid needless check_separable_and_linear tests.
When we make a memory store for a target device, we use
the encoding/decoding color functions from that target
device. It seems reasonable to copy the "separable_and_linear"
information from that device too, to avoid having to needlessly
retest using the same encoding/decoding functions to get
the same answer.
Next, extend gx_color_enc_sep_lin_t to represent not just
whether we know details about the device colors separability
and linearity (and what those details are if known), but also
to encode whether those are standard encodings or not. The
standard encoding is defined to be "that which is compatible
with the pdf14 compositor".
Finally, we add a function, check_device_separable_encoding,
that 'promotes' the record for a given space from being a
known separable_and_linear one, to one that knows it's
separable_and_linear, but also knows whether it uses the
standard encoding.
Call this in clist_close_writer_and_init_reader to ensure that
the buffer device is created knowing whether it's a standard
encoding or not. If called here, it only ever needs to run once.
Call it again in pdf14_ok_to_optimize (just in case we ever slip
through - this takes no time if it has been run already). This
enables us to make a correct choice, and to avoid skipping
transparency bands if we are not using the standard (pdf14
compositor compatible) encoding.
Diffstat (limited to 'base/gsicc.c')
-rw-r--r-- | base/gsicc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/gsicc.c b/base/gsicc.c index 80c6464de..30868bb4b 100644 --- a/base/gsicc.c +++ b/base/gsicc.c @@ -219,7 +219,7 @@ gx_cspace_is_linear_ICC(const gs_color_space *cs, const gs_gstate * pgs, if (gx_device_must_halftone(dev)) return 0; if (icclink->is_identity) return 1; /* Transform is identity, linear! */ - if (dev->color_info.separable_and_linear != GX_CINFO_SEP_LIN) + if (!colors_are_separable_and_linear(&dev->color_info)) return_error(gs_error_rangecheck); if (c2 == NULL) return gx_icc_is_linear_in_line(cs, pgs, dev, c0, c1, smoothness, icclink); |