diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-03-30 10:17:10 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-03-30 10:17:10 +0000 |
commit | 3bdda000eabced6e4c015af4c6dbb5b02f1abdda (patch) | |
tree | f1e9e8e7acb5c141cf4160cac426841b25d0b491 /gs/base/gdevdrop.c | |
parent | f81e8f47c06572ecc4f7e3fcc03ca4db60507ce4 (diff) |
Add new dev_spec_op operation for spotting that a device maps colours in
the 'standard' 1bit cmyk way, and use that rather than manually checking
function pointers. This allows bitcmyk, pamcmyk4 and plibk devices to
correctly spot the optimisation in get_bits (used for rops that use D).
Testing locally indicates that the special case is now taken, but that no
differences are seen in the results (as we would hope).
No cluster differences expected.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@12328 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/base/gdevdrop.c')
-rw-r--r-- | gs/base/gdevdrop.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gs/base/gdevdrop.c b/gs/base/gdevdrop.c index e878b79fa..1ff28838f 100644 --- a/gs/base/gdevdrop.c +++ b/gs/base/gdevdrop.c @@ -25,6 +25,7 @@ #include "gxgetbit.h" #include "gdevmem.h" /* for mem_default_strip_copy_rop prototype */ #include "gdevmrop.h" +#include "gxdevsop.h" /* * Define the maximum amount of space we are willing to allocate for a @@ -578,11 +579,16 @@ mem_default_strip_copy_rop(gx_device * dev, /* We know the device is a memory device, so we can store the * result directly into its scan lines, unless it is planar. */ - pack = (tdev->num_planes <= 1 ? - ((dev_proc(dev, map_cmyk_color) == cmyk_1bit_map_cmyk_color && - rop_depth == 24) ? - pack_cmyk_1bit_from_standard : pack_from_standard) : - pack_planar_from_standard); + if (tdev->num_planes <= 1) { + if ((rop_depth == 24) && (dev_proc(dev, dev_spec_op)(dev, + gxdso_is_std_cmyk_1bit, NULL, 0) > 0)) { + pack = pack_cmyk_1bit_from_standard; + } else { + pack = pack_from_standard; + } + } else { + pack = pack_planar_from_standard; + } #ifdef DEBUG if (gs_debug_c('b')) trace_copy_rop("mem_default_strip_copy_rop", |