From 043e3d9058f414607ed8454783175db57e7e6524 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 25 Sep 2018 21:50:49 +0100 Subject: Always set the tag, even if the device won't encode it. Intended to sort an issue encountered while debugging bug 699809, namely that tag dependent ICC handling only works for devices that actually encode tags. --- base/gxgstate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/gxgstate.h b/base/gxgstate.h index 975dd8d20..1310b1266 100644 --- a/base/gxgstate.h +++ b/base/gxgstate.h @@ -502,9 +502,9 @@ void gs_swapcolors_quick(gs_gstate *); /* Also make sure the tag is set in the device so the two remain in sync. */ static inline void ensure_tag_is_set(gs_gstate *pgs, gx_device *dev, gs_graphics_type_tag_t tag) { + if ((dev->graphics_type_tag & tag) == 0) + dev_proc(dev, set_graphics_type_tag)(dev, tag); if (device_encodes_tags(dev)) { - if ((dev->graphics_type_tag & tag) == 0) - dev_proc(dev, set_graphics_type_tag)(dev, tag); if ((pgs->color[0].dev_color->tag & tag) == 0) { gx_unset_dev_color(pgs); /* current dev_color needs update to new tag */ pgs->color[0].dev_color->tag = tag; /* after unset, now set it */ -- cgit v1.2.1