<AWT Dev> [13] RFR 8214109: XToolkit is not correctly displayed color on 16-bit high color setting
Dmitry Markov
dmitry.markov at oracle.com
Sun Jan 27 14:26:31 UTC 2019
Hello,
Could you review a fix for jdk13, please?
bug: https://bugs.openjdk.java.net/browse/JDK-8214109 <https://bugs.openjdk.java.net/browse/JDK-8214109>
webrev: http://cr.openjdk.java.net/~dmarkov/8214109/webrev.00/ <http://cr.openjdk.java.net/~dmarkov/8214109/webrev.00/>
Problem description:
On xvnc4 environment the colour of the background and the colour of the repaint area may be different (and it’s visually noticeable) even if the same colour is specified. The root cause of this behaviour is that we always use ColorModel to calculate a pixel value in XWindow.xSetBackground() and at the same time the pixel value for repaint area is calculated using SurfaceData methods, (e.g. SurfaceData.pixelFor()). Actually this is regression caused by JDK-6304250 which introduced ColorModel based calculation of the pixel value to fix problem for OpenGL pipeline.
Fix:
It is necessary to modify XWindow.xSetBackground(): if OpenGL pipeline is enabled we should use ColorModel to calculate the pixel value; otherwise we should use SurfaceData.pixelFor() for calculation.
Thanks,
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20190127/22971793/attachment.html>
More information about the awt-dev
mailing list