diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2010-05-10 01:57:42 +0000 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2010-05-10 01:57:42 +0000 |
commit | ae7669277a0560b821bffdceb6fff9d0339b1601 (patch) | |
tree | 961c85da30a8113398229685e1e4b7df1c8a440e | |
parent | 0ad4b310518750a9e008b0867e380cf45e7dc772 (diff) |
Reversion to 11210 until I figure out what went wrong...
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11212 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | gs/base/gspaint.c | 26 | ||||
-rw-r--r-- | gs/base/gsutil.c | 19 | ||||
-rw-r--r-- | gs/base/gsutil.h | 2 | ||||
-rw-r--r-- | gs/base/gxpcmap.c | 17 | ||||
-rw-r--r-- | gs/base/lib.mak | 2 |
5 files changed, 22 insertions, 44 deletions
diff --git a/gs/base/gspaint.c b/gs/base/gspaint.c index fc2a39aa6..9ac14c5ad 100644 --- a/gs/base/gspaint.c +++ b/gs/base/gspaint.c @@ -87,6 +87,26 @@ gs_fillpage(gs_state * pgs) return code; return (*dev_proc(dev, sync_output)) (dev); } + +/* + * Determine the number of bits of alpha buffer for a stroke or fill. + * We should do alpha buffering iff this value is >1. + */ +static int +alpha_buffer_bits(gs_state * pgs) +{ + gx_device *dev; + + if (!color_is_pure(gs_currentdevicecolor_inline(pgs))) + return 0; + dev = gs_currentdevice_inline(pgs); + if (gs_device_is_abuf(dev)) { + /* We're already writing into an alpha buffer. */ + return 0; + } + return (*dev_proc(dev, get_alpha_bits)) + (dev, (pgs->in_cachedevice ? go_text : go_graphics)); +} /* * Set up an alpha buffer for a stroke or fill operation. Return 0 * if no buffer could be allocated, 1 if a buffer was installed, @@ -267,9 +287,6 @@ static int do_fill(gs_state *pgs, int rule) if (code < 0) return code; abits = alpha_buffer_bits(pgs); - if (!color_is_pure(gs_currentdevicecolor_inline(pgs))) { - abits = 0; - } if (abits > 1) { acode = alpha_buffer_init(pgs, pgs->fill_adjust.x, pgs->fill_adjust.y, abits); @@ -375,9 +392,6 @@ do_stroke(gs_state * pgs) if (code < 0) return code; abits = alpha_buffer_bits(pgs); - if (!color_is_pure(gs_currentdevicecolor_inline(pgs))) { - abits = 0; - } if (abits > 1) { /* * Expand the bounding box by the line width. diff --git a/gs/base/gsutil.c b/gs/base/gsutil.c index f807a5817..9301e0e13 100644 --- a/gs/base/gsutil.c +++ b/gs/base/gsutil.c @@ -25,7 +25,6 @@ #include "gsutil.h" /* for prototypes */ #include "gzstate.h" #include "gxdcolor.h" -#include "gxdevmem.h" @@ -314,21 +313,3 @@ gs_current_object_tag(gs_memory_t * mem) return mem->gs_lib_ctx->BITTAG; } -/* - * Determine the number of bits of alpha buffer for a stroke or fill. - * We should do alpha buffering iff this value is >1. - */ -int -alpha_buffer_bits(gs_state * pgs) -{ - gx_device *dev; - - dev = gs_currentdevice_inline(pgs); - if (gs_device_is_abuf(dev)) { - /* We're already writing into an alpha buffer. */ - return 0; - } - return (*dev_proc(dev, get_alpha_bits)) - (dev, (pgs->in_cachedevice ? go_text : go_graphics)); -} - diff --git a/gs/base/gsutil.h b/gs/base/gsutil.h index f078a0384..f022e85c1 100644 --- a/gs/base/gsutil.h +++ b/gs/base/gsutil.h @@ -68,6 +68,4 @@ gs_object_tag_type_t gs_current_object_tag(gs_memory_t *); void gs_set_object_tag(gs_state * pgs, const gs_object_tag_type_t tag); void gs_enable_object_tagging(gs_memory_t *); -int alpha_buffer_bits(gs_state * pgs); - #endif /* gsutil_INCLUDED */ diff --git a/gs/base/gxpcmap.c b/gs/base/gxpcmap.c index 5ab97b4fb..87ad7638d 100644 --- a/gs/base/gxpcmap.c +++ b/gs/base/gxpcmap.c @@ -325,7 +325,6 @@ pattern_accum_open(gx_device * dev) int height = pinst->size.y; int code = 0; bool mask_open = false; - int abits; /* * C's bizarre coercion rules force us to copy HWResolution in pieces @@ -408,24 +407,11 @@ pattern_accum_open(gx_device * dev) mem, -1, target); PDSET(bits); #undef PDSET - bits->color_info = padev->color_info; + bits->color_info = padev->color_info; bits->bitmap_memory = mem; code = (*dev_proc(bits, open_device)) ((gx_device *) bits); gx_device_set_target((gx_device_forward *)padev, (gx_device *)bits); - if (pinst->saved) { - abits = alpha_buffer_bits(pinst->saved); - if (abits > 1) { - if (bits->color_info.polarity == - GX_CINFO_POLARITY_SUBTRACTIVE) { - memset(bits->base, 0, - bits->raster * bits->height); - } else { - memset(bits->base, 255, - bits->raster * bits->height); - } - } - } } } } @@ -1146,4 +1132,3 @@ gs_pattern1_remap_color(const gs_client_color * pc, const gs_color_space * pcs, pdc->mask.m_tile = 0; return gx_pattern_load(pdc, pis, dev, select); } - diff --git a/gs/base/lib.mak b/gs/base/lib.mak index c3bf8ee29..30ea4733e 100644 --- a/gs/base/lib.mak +++ b/gs/base/lib.mak @@ -265,7 +265,7 @@ $(GLOBJ)gsserial.$(OBJ) : $(GLSRC)gsserial.c $(stdpre_h) $(gstypes_h)\ $(GLOBJ)gsutil.$(OBJ) : $(GLSRC)gsutil.c $(AK) $(memory__h) $(string__h)\ $(gstypes_h) $(gserror_h) $(gserrors_h) $(gsmemory_h)\ - $(gsrect_h) $(gsuid_h) $(gsutil_h) $(gzstate_h) $(gxdcolor_h) $(gxdevmem_h) + $(gsrect_h) $(gsuid_h) $(gsutil_h) $(gzstate_h) $(gxdcolor_h) $(GLCC) $(GLO_)gsutil.$(OBJ) $(C_) $(GLSRC)gsutil.c # MD5 digest |