Hi Sergey,
The fix looks good me.
Shall this bug id — 8235153 — be added to the @bug in the test?
On 02/03/2020 09:22, Sergey Bylokhov wrote:
Hello.
Please review the fix for jdk/client.
Bug: https://bugs.openjdk.java.net/browse/JDK-8235153
Fix: http://cr.openjdk.java.net/~serb/8235153/webrev.00
This test have an assumption that java.awt.SystemColor contains
only opaque colors, and this is the reason why it fails on macOS
where some colors have alpha.
The test calls DST.drawImage(src, x,x,BG_Color,null) and assumes that the
background of the image will be exactly the same BG_Color.
- If the DST image and BG_Color both have alpha then we will get a mix of
them since AlphaComposite.SrcOver is used by default, fixed by the
"Src" mode:
g.setComposite(AlphaComposite.Src)
- If the DST image does not have alpha and BG_Color has it, then we
need to
drop alpha from the BG_Color to properly compare to the background
color of DST.
I have checked that an updated test still fails on JDK where initial
bug was not fixed.
--
Regards,
Alexey