> On 02-Sep-2020, at 10:46 AM, Sergey Bylokhov <sergey.bylok...@oracle.com>
> wrote:
>
> On 01.09.2020 03:42, Ajit Ghaisas wrote:
>>>
>>> In the HiDPI mode the VolatileImage internally have twice more pixels than
>>> BufferedImage, so when we draw the data to
>>> the VolatileImage and then scale it back to the size of the BufferedImage
>>> for comparison, the test fails.
>> This looks good. I checked with OGL and Metal (project Lanai) on macOS.
>> One question is - do we need to support this test in HiDPI mode?
>
> The difference between HiDPI and non-HiDPI mode is that VolatileImage has
> more
> pixels and every draw operation use scaled blits. The test in question scales
> the graphics ourselves. To eliminate the "sun.java2d.uiScale=1" we will need
> to
> apply the scale to the BufferedImage size, then we should skip the usage of
> "getSnapshot", and then we will need to scale all rendering to the
> BufferedImage(simulating the HiDPI in VolatileImage), but in the end, the same
> scaled blit will be tested.
OK. Thanks for the explanation.
Test fix looks good. +1. (not a ‘R’ reviewer)
Regards,
Ajit
> --
> Best regards, Sergey.