<AWT Dev> [13] RFR 8214109: XToolkit is not correctly displayed color on 16-bit high color setting

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Jan 29 06:32:30 UTC 2019


Hi, Dmitry.

It looks like the whole fix is a rework of JDK-6304250, so
probably it is possible to fix it in java2d(in ogl) and
eliminate this "check for the current 2d pipeline" from the awt code?

It is looks strange that in OGL we can use correct color in "repain()"
and cannot get this color in other place.

On 27/01/2019 06:26, Dmitry Markov wrote:
> Hello,
> 
> Could you review a fix for jdk13, please?
> 
> bug: https://bugs.openjdk.java.net/browse/JDK-8214109
> webrev: 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


-- 
Best regards, Sergey.


More information about the awt-dev mailing list