summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-02-18 15:02:17 +0000
committerChris Liddell <chris.liddell@artifex.com>2022-02-21 11:28:05 +0000
commit270438bfda605c258f5841e7917a16fdc2cf7968 (patch)
tree9840573881f7ffd99aaac2a83349b3980345d867
parentd56ebbd30ded81354936bc7d4b1caab73d5e0d6d (diff)
downloadghostpdl-270438bfda605c258f5841e7917a16fdc2cf7968.tar.gz
Bug 703013: Fix color_info for buffered/wrapped X11 devices
When I rejigged the buffered mode for the X11 devices when using a color depth that we have to "hide" from the rest of Ghostcript, I got the "color_info" and the "orig_color_info" logic reversed when setting up the memory buffer device.
-rw-r--r--devices/gdevxini.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/devices/gdevxini.c b/devices/gdevxini.c
index 914e88e78..fafcd42a8 100644
--- a/devices/gdevxini.c
+++ b/devices/gdevxini.c
@@ -589,9 +589,9 @@ x_set_buffer(gx_device_X * xdev)
* *But* if we run buffered, we have to use the real specs of the real x11 device.
* Hence, the real color_info is saved into orig_color_info, and we use that here.
*/
- if (mdev == 0 || mdev->color_info.depth != xdev->orig_color_info.depth) {
+ if (mdev == 0 || mdev->color_info.depth != xdev->color_info.depth) {
const gx_device_memory *mdproto =
- gdev_mem_device_for_bits(xdev->orig_color_info.depth);
+ gdev_mem_device_for_bits(xdev->color_info.depth);
if (!mdproto) {
buffered = false;
@@ -643,7 +643,7 @@ x_set_buffer(gx_device_X * xdev)
rc_decrement(mdev->icc_struct, "x_set_buffer");
mdev->icc_struct = xdev->icc_struct;
rc_increment(xdev->icc_struct);
- mdev->color_info = xdev->orig_color_info;
+ mdev->color_info = xdev->color_info;
mdev->base = xdev->buffer;
gdev_mem_open_scan_lines(mdev, xdev->height);
}