From ece0c97f7c85af0dbd31532da4a7bef2c1f6fd0c Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 21 Aug 2019 14:28:20 +0100 Subject: Bug 701451: Fix clist color_usage calculations for shadings. Or rather, don't attempt to calculate them badly, and just use the safe "all colors" value. --- base/gxclrect.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/base/gxclrect.c b/base/gxclrect.c index 07f398f21..a4b5982d1 100644 --- a/base/gxclrect.c +++ b/base/gxclrect.c @@ -425,21 +425,6 @@ clist_fill_rectangle_hl_color(gx_device *dev, const gs_fixed_rect *rect, return 0; } -static void update_color_use_frac_array(uchar num_colors, const frac31 *color, - cmd_rects_enum_t *re) -{ - uchar k; - - if (color == NULL) - return; - - for (k = 0; k < num_colors; k++){ - if (color[k] != 0) { - re->pcls->color_usage.or |= (1<color_info.num_components, c0, &re); - update_color_use_frac_array(dev->color_info.num_components, c1, &re); - update_color_use_frac_array(dev->color_info.num_components, c2, &re); - update_color_use_frac_array(dev->color_info.num_components, c3, &re); + re.pcls->color_usage.or |= gx_color_usage_all(cdev); code = 0; } if (code >= 0) { - /* Dont't want to shorten the trapezoid by the band boundary, + /* Don't want to shorten the trapezoid by the band boundary, keeping in mind a further optimization with writing same data to all bands. */ code = cmd_write_trapezoid_cmd(cdev, re.pcls, cmd_opv_fill_trapezoid, left, right, ybot, ytop, options, fa, c0, c1, c2, c3); -- cgit v1.2.1