RE: Fix for 687442 GX_CINFO_SEP_LIN_UNKNOWN in displaydevice

"Dan Coby" <[email protected]>
Newsgroups gmane.comp.printing.ghostscript.patches
Message-ID <[email protected]>
Russell,


You are setting separable_and_linear to NONE in the appropriate
locations.  However this variable is not set in the remaining cases.
My suggestion is to set this to UNKNOWN either at the start or in
the appropriate location with a comment that check_device_separable
will determine the appropriate value and setup the related parameters.

The part of the patch shown below is not really necessary.  Either
the device is separable, in which case, this data is setup by the
call to check_device_separable, or the device is not separable in
which case this data is not used.

@@ -1202,9 +1215,14 @@
 
     /* restore old anti_alias info */
     dci.anti_alias = ddev->color_info.anti_alias;
+    for (i=0; i<GX_DEVICE_COLOR_MAX_COMPONENTS; i++) {
+        /* Clear the mask bits, etc.  */
+	dci.comp_shift[i] = 0;
+	dci.comp_mask[i] = 0;
+	dci.comp_bits[i] = 0;
+    }
     ddev->color_info = dci;


Dan

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Russell Lang
Sent: Friday, May 07, 2004 5:18 AM
To: [email protected]
Subject: [gs-code-review] Fix for 687442 GX_CINFO_SEP_LIN_UNKNOWN in
displaydevice


Dan,

LOG MESSAGE: 
Enable separable_and_linear and separable for the display device. 
Fixes bug #687442.   

DETAILS:
Enable separable_and_linear for gray, RGB and CMYK formats.
The display device needs to explicitly call check_device_separable
because it is closed and reopened when the callback is set,
which causes linear_and_separable to be reset.
Set the gray_index which is not set by check_device_separable.
Prevent the unimplemented DISPLAY_ALPHA_FIRST and 
DISPLAY_ALPHA_LAST from being used.
Make it clear that the display_map_rgb_color_rgb and
display_map_color_rgb_rgb functions only work with 8bits/pixel.

Russell Lang                   [email protected]
Ghostgum Software Pty Ltd      http://www.ghostgum.com.au/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.