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