summaryrefslogtreecommitdiff
path: root/base/gsptype1.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2019-08-26 11:28:40 +0100
committerRobin Watts <Robin.Watts@artifex.com>2019-08-26 11:33:06 +0100
commit1fe43c3ba4423631129925d789c936b9e461d1d6 (patch)
tree643dbb0f6f7e3d8b0cdf2a6a9a758b22024b6e4c /base/gsptype1.c
parent0ac36b1eb87a919d3df19b7fb555d277d959396b (diff)
downloadghostpdl-1fe43c3ba4423631129925d789c936b9e461d1d6.tar.gz
Fix problems with pngalpha and deep color transparency filling.
The pngalpha device is created with a depth of 32, with 3 color components; this was confusing pdf14 into thinking that more than 8 bits per color were being used, and so deep color buffers were required. To fix this we update the logic to be smarter; in cases where we don't have a clear determination based on bits alone, we look at the max_color and max_gray values. Because this code is now more complex than before, we pull it into a shared function.
Diffstat (limited to 'base/gsptype1.c')
-rw-r--r--base/gsptype1.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/base/gsptype1.c b/base/gsptype1.c
index da96e8b9c..f81a63c10 100644
--- a/base/gsptype1.c
+++ b/base/gsptype1.c
@@ -2047,10 +2047,7 @@ gx_dc_pattern_read(
int code, l;
tile_trans_clist_info_t trans_info = { { { 0 } } };
int cache_space_needed;
- bool has_tags = device_encodes_tags(dev);
- int bits_per_comp = ((dev->color_info.depth - has_tags*8) /
- dev->color_info.num_components);
- bool deep = bits_per_comp > 8;
+ bool deep = device_is_deep(dev);
if (offset == 0) {
pdevc->mask.id = gx_no_bitmap_id;