[OpenJDK 2D-Dev] RFR: JDK-8218682 + JDK-8198411: [TEST_BUG] DashOffset fails in mach5 + Two java2d tests are unstable in mach5
Alexey Ivanov
alexey.ivanov at oracle.com
Mon Feb 11 17:28:04 UTC 2019
Hi Sergey,
On 11/02/2019 17:03, Sergey Bylokhov wrote:
> Hi, Alexey.
>
> On 11/02/2019 01:44, Alexey Ivanov wrote:
>> Isn't isHeadless() used by jtreg itself?
>> These tests seem to have failed only in Windows where there's no true
>> headless environment. Recent versions of Windows Server allow
>> installing the OS without support for desktop environment, it could
>> be the reason why we see the limited IndexColorModel.
>>
>> I was thinking whether I shall add a diagnostic message for skipping
>> VolatileImage when IndexColorModel is in effect…
>
> Is it possible in case of non-default color model to use
> BufferedImages as gold version to compare?
No, it does not look like it's possible directly.
In the case of DashOffset, VolatileImage contains #F8F8F8 instead of
#FFFFFF, #0000CC instead of #0000FF, #00CC00 instead of #00FF00. In
other configurations, the colours could be different. BufferedImage
contains the expected colours.
However, it could be possible to analyse the change in colour rather
than absolute values. For example, a colour with equal R-G-B components
could be considered as “white”; a colour with only blue component could
be considered as “blue”, and similarly for green.
The problem with this approach is that we assume that such colours exist
in IndexColorModel. Since we don't control IndexColorModel, this
assumption could be wrong, and we'd get a false failure.
If we didn't assume specific colours but rather assigned dynamic values
to “white”, “blue” and “green” based on the colours in the image, the
tests could become more useful as the coverage would increase. But
validation code should be somewhat different for VolatileImage from that
for BufferedImage.
--
Regards,
Alexey
More information about the 2d-dev
mailing list