summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-02-06 15:25:33 +0000
committerRobin Watts <robin.watts@artifex.com>2012-02-06 16:49:15 +0000
commitea8d2baefa33457d89b4daa8a80dd1898a362bd3 (patch)
tree347b1711f8b6a876204710d55f92bb24904d66bb
parent013136f0e1050dc25c441fdf49dbfeb21ce0ee7a (diff)
Remove last vestiges of halftone cache.
Back in 2002 code was committed (as part of the DeviceN work) that removed the halftone cache from the image state. The last vestiges of this were functions: gx_check_tile_cache_current gx_check_tile_cache gx_check_tile_size All these were hardwired to return a constant value, but the calls to them were never removed from the code. Here, we remove those calls. No differences should be given.
-rw-r--r--gs/base/gxht.c33
-rw-r--r--gs/base/gximono.c38
-rw-r--r--gs/base/gxipixel.c2
-rw-r--r--gs/base/gzht.h14
4 files changed, 15 insertions, 72 deletions
diff --git a/gs/base/gxht.c b/gs/base/gxht.c
index 72d3f1524..b970a50b5 100644
--- a/gs/base/gxht.c
+++ b/gs/base/gxht.c
@@ -167,39 +167,6 @@ gx_ht_free_cache(gs_memory_t * mem, gx_ht_cache * pcache)
gs_free_object(mem, pcache, "free_ht_cache(struct)");
}
-/* Check whether the tile cache corresponds to the current order */
-bool
-gx_check_tile_cache_current(const gs_imager_state * pis)
-{
- /* TO_DO_DEVICEN - this routine is no longer used - delete. */
- return false;
-}
-
-/* Make the cache order current, and return whether */
-/* there is room for all possible tiles in the cache. */
-bool
-gx_check_tile_cache(const gs_imager_state * pis)
-{
- /* TO_DO_DEVICEN - this routine is no longer used - delete. */
- return false;
-}
-
-/*
- * Determine whether a given (width, y, height) might fit into a single
- * (non-strip) tile. If so, return the byte offset of the appropriate row
- * from the beginning of the tile, and set *ppx to the x phase offset
- * within the tile; if not, return -1.
- *
- * This routine cannot be supported in the DeviceN code.
- */
-int
-gx_check_tile_size(const gs_imager_state * pis, int w, int y, int h,
- gs_color_select_t select, int *ppx)
-{
- /* TO_DO_DEVICEN - this routine is no longer used - delete. */
- return -1;
-}
-
/* Render a given level into a halftone cache. */
static int render_ht(gx_ht_tile *, int, const gx_ht_order *,
gx_bitmap_id);
diff --git a/gs/base/gximono.c b/gs/base/gximono.c
index 2ee8e4ee7..b25d57f76 100644
--- a/gs/base/gximono.c
+++ b/gs/base/gximono.c
@@ -209,7 +209,7 @@ image_set_gray(byte sample_value, const bool masked, uint mask_base,
uint mask_limit, gx_device_color **ppdevc, gs_client_color *cc,
const gs_color_space *pcs, const gs_imager_state *pis,
gx_device * dev, gs_color_select_t gs_color_select_source,
- gx_image_enum * penum, bool tiles_fit)
+ gx_image_enum * penum)
{
cs_proc_remap_color((*remap_color));
int code;
@@ -238,11 +238,9 @@ image_set_gray(byte sample_value, const bool masked, uint mask_base,
return(code);
}
} else if (!color_is_pure(pdevc)) {
- if (!tiles_fit) {
- code = gx_color_load_select(pdevc, pis, dev, gs_color_select_source);
- if (code < 0)
- return(code);
- }
+ code = gx_color_load_select(pdevc, pis, dev, gs_color_select_source);
+ if (code < 0)
+ return(code);
}
return(0);
}
@@ -265,7 +263,6 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
cs_proc_remap_color((*remap_color)) = NULL; /* ditto */
gs_client_color cc;
gx_device_color *pdevc = penum->icolor1; /* color for masking */
- bool tiles_fit;
uint mask_base = /* : 0 to pacify Valgrind */
(penum->use_mask_color ? penum->mask_color.values[0] : 0);
uint mask_limit =
@@ -273,7 +270,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
penum->mask_color.values[1] - mask_base + 1 : 0);
/*
* Free variables of IMAGE_SET_GRAY:
- * Read: penum, pis, dev, tiles_fit, mask_base, mask_limit
+ * Read: penum, pis, dev, mask_base, mask_limit
* Set: pdevc, code, cc
*/
#define IMAGE_SET_GRAY(sample_value)\
@@ -289,11 +286,9 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
goto err;\
}\
} else if (!color_is_pure(pdevc)) {\
- if (!tiles_fit) {\
- code = gx_color_load_select(pdevc, pis, dev, gs_color_select_source);\
- if (code < 0)\
- goto err;\
- }\
+ code = gx_color_load_select(pdevc, pis, dev, gs_color_select_source);\
+ if (code < 0)\
+ goto err;\
}\
END
gx_dda_fixed_point next; /* (y not used in fast loop) */
@@ -316,12 +311,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
* for masked images with a pure color.
*/
- /* TO_DO_DEVICEN - The gx_check_tile_cache_current() routine is bogus */
-
- if (pis == 0 || !gx_check_tile_cache_current(pis)) {
- image_init_clues(penum, penum->bps, penum->spp);
- }
- tiles_fit = (pis && penum->device_color ? gx_check_tile_cache(pis) : false);
+ image_init_clues(penum, penum->bps, penum->spp);
next = penum->dda.pixel0;
xrun = dda_current(next.x);
if (!masked) {
@@ -530,7 +520,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
htrun = run;
#if USE_SET_GRAY_FUNCTION
code = image_set_gray(run,masked,mask_base,mask_limit,&pdevc,
- &cc,pcs,pis,dev,gs_color_select_source,penum,tiles_fit);
+ &cc,pcs,pis,dev,gs_color_select_source,penum);
if (code < 0)
goto err;
#else
@@ -572,7 +562,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
htrun = run;
#if USE_SET_GRAY_FUNCTION
code = image_set_gray(run,masked,mask_base,mask_limit,&pdevc,
- &cc,pcs,pis,dev,gs_color_select_source,penum,tiles_fit);
+ &cc,pcs,pis,dev,gs_color_select_source,penum);
if (code < 0)
goto err;
#else
@@ -599,7 +589,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
if (!masked) {
#if USE_SET_GRAY_FUNCTION
code = image_set_gray(*stop, masked,mask_base,mask_limit,&pdevc,
- &cc,pcs,pis,dev,gs_color_select_source,penum,tiles_fit);
+ &cc,pcs,pis,dev,gs_color_select_source,penum);
if (code < 0)
goto err;
#else
@@ -707,7 +697,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
if (run != htrun) {
#if USE_SET_GRAY_FUNCTION
code = image_set_gray(run, masked,mask_base,mask_limit,&pdevc,
- &cc,pcs,pis,dev,gs_color_select_source,penum,tiles_fit);
+ &cc,pcs,pis,dev,gs_color_select_source,penum);
if (code < 0)
goto err;
#else
@@ -754,7 +744,7 @@ image_render_mono(gx_image_enum * penum, const byte * buffer, int data_x,
}
#if USE_SET_GRAY_FUNCTION
code = image_set_gray(*stop, masked,mask_base,mask_limit,&pdevc,
- &cc,pcs,pis,dev,gs_color_select_source,penum,tiles_fit);
+ &cc,pcs,pis,dev,gs_color_select_source,penum);
if (code < 0)
goto err;
#else
diff --git a/gs/base/gxipixel.c b/gs/base/gxipixel.c
index 5c721e685..955892c03 100644
--- a/gs/base/gxipixel.c
+++ b/gs/base/gxipixel.c
@@ -1112,7 +1112,7 @@ image_init_colors(gx_image_enum * penum, int bps, int spp,
/* Clues are only used with image_mono_render */
if (spp == 1) {
- image_init_clues(penum, bps, spp);
+ image_init_clues(penum, bps, spp);
}
decode_type = 3; /* 0=custom, 1=identity, 2=inverted, 3=impossible */
for (ci = 0; ci < spp; ci +=2 ) {
diff --git a/gs/base/gzht.h b/gs/base/gzht.h
index b0f1828e2..1ef5d6a6e 100644
--- a/gs/base/gzht.h
+++ b/gs/base/gzht.h
@@ -175,20 +175,6 @@ void gx_ht_free_cache(gs_memory_t *, gx_ht_cache *);
/* Initialize a halftone cache with a given order. */
void gx_ht_init_cache(const gs_memory_t *mem, gx_ht_cache *, const gx_ht_order *);
-/* Check whether the tile cache corresponds to the current order */
-bool gx_check_tile_cache_current(const gs_imager_state * pis);
-
-/* Make the cache order current, and return whether */
-/* there is room for all possible tiles in the cache. */
-bool gx_check_tile_cache(const gs_imager_state *);
-
-/* Determine whether a given (width, y, height) might fit into a */
-/* single tile. If so, return the byte offset of the appropriate row */
-/* from the beginning of the tile, and set *ppx to the x phase offset */
-/* within the tile; if not, return -1. */
-int gx_check_tile_size(const gs_imager_state * pis, int w, int y, int h,
- gs_color_select_t select, int *ppx);
-
/* Make a given level current in a halftone cache. */
#define gx_render_ht(pcache, b_level)\
((pcache)->render_ht(pcache, b_level))