summaryrefslogtreecommitdiff
path: root/base/gxclimag.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-11-08 15:02:13 +0000
committerRobin Watts <Robin.Watts@artifex.com>2021-11-08 16:56:13 +0000
commit3637bcc90d2bd70b7a22716d95c0028e1f1027bd (patch)
tree56dd328b6d88cf645c192385aa98e8d15a577347 /base/gxclimag.c
parent1538a3cf288d935645f8b9d2caac79d802c8f4c0 (diff)
downloadghostpdl-3637bcc90d2bd70b7a22716d95c0028e1f1027bd.tar.gz
Bug 704701: Split clist handling of screen_phase and tile_phase.
The clist attempts to send both screen phase (derived from color) and tile phase (for strip_copy_rop) etc using the same command. Unfortunately, there are instances (for example, when using PCL transparency) where we need to send both screen and tile phase through, but with different values. For correctness (and just as importantly, simplicity and sanity), move to sending tile and screen phases through separately.
Diffstat (limited to 'base/gxclimag.c')
-rw-r--r--base/gxclimag.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/base/gxclimag.c b/base/gxclimag.c
index b67fb0e9f..4f99e4810 100644
--- a/base/gxclimag.c
+++ b/base/gxclimag.c
@@ -1154,11 +1154,21 @@ clist_image_plane_data(gx_image_enum_common_t * info,
* color is pure (so no phase is sent), but the colors in the image
* are not (so a phase must be sent). Accordingly, we catch that
* here. */
- if (pie->pgs->screen_phase[0].x != re.pcls->tile_phase.x ||
- pie->pgs->screen_phase[0].y != re.pcls->tile_phase.y) {
- code = cmd_set_tile_phase_generic(cdev, re.pcls,
- pie->pgs->screen_phase[0].x,
- pie->pgs->screen_phase[0].y, true);
+ if (pie->pgs->screen_phase[gs_color_select_texture].x != re.pcls->screen_phase[gs_color_select_texture].x ||
+ pie->pgs->screen_phase[gs_color_select_texture].y != re.pcls->screen_phase[gs_color_select_texture].y) {
+ code = cmd_set_screen_phase_generic(cdev, re.pcls,
+ pie->pgs->screen_phase[gs_color_select_texture].x,
+ pie->pgs->screen_phase[gs_color_select_texture].y,
+ gs_color_select_texture, true);
+ if (code < 0)
+ return code;
+ }
+ if (pie->pgs->screen_phase[gs_color_select_source].x != re.pcls->screen_phase[gs_color_select_source].x ||
+ pie->pgs->screen_phase[gs_color_select_source].y != re.pcls->screen_phase[gs_color_select_source].y) {
+ code = cmd_set_screen_phase_generic(cdev, re.pcls,
+ pie->pgs->screen_phase[gs_color_select_source].x,
+ pie->pgs->screen_phase[gs_color_select_source].y,
+ gs_color_select_source, true);
if (code < 0)
return code;
}