<AWT Dev> <Swing Dev>[9] Review Request JDK-8151787 Unify the HiDPI splash screen image naming convention
Alexander Scherbatiy
alexandr.scherbatiy at oracle.com
Thu Aug 11 09:13:48 UTC 2016
On 10/08/16 19:24, Alexandr Scherbatiy wrote:
>
> On 8/9/2016 11:18 AM, Rajeev Chamyal wrote:
>
>> Hello All,
>>
>> Please review the following webrev.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8151787
>>
>> Webrev: http://cr.openjdk.java.net/~rchamyal/8151787/webrev.00/
>> <http://cr.openjdk.java.net/%7Erchamyal/8151787/webrev.00/>
>>
>> Issue: Currently different naming conventions are used for Hidpi
>> image on different platforms.
>>
>> With this change the names will be unified across all platforms.
>>
>> For a unscaled image image.ext following naming convention will be
>> followed.
>>
>> Unscaled name: image.ext
>>
>> Supported Scaled Names:
>>
>> If screen scale is integer number e.g. 2: image at 2x.ext
>> <mailto:image at 2x.ext>
>>
>> If screen scale is float value like 1.25: image at 125pct.ext
>> <mailto:image at 125pct.ext>
>>
>
> The fix should be reviewed on the awt-dev alias.
>
> + if(*scaleFactor - (int)*scaleFactor < 0.000001)
>
> Should there be so high precision there? Could only percent values be
> compared like
> if ((*scaleFactor *100) != ((int)(*scaleFactor)) * 100)
>
>
> + //map the splash co-ordinates as per system scale
> + splash->x /= splash->scaleFactor;
> + splash->y /= splash->scaleFactor;
>
> It looks like the splash coordinates and sizes are rescaled in
> different places. Is it possible to do that in the same place? May be
> in java_awt_SplashScreen.c file getBounds() function?
src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c
*scaleFactor = getNativeScaleFactor();
Could you also include the change which requires to add some default
output screen name to the getNativeScaleFactor() function on Linux.
There is the discussion about that:
http://mail.openjdk.java.net/pipermail/awt-dev/2016-August/011766.html
Thanks,
Alexandr.
>
> Thanks,
> Alexandr.
>
>> Regards,
>>
>> Rajeev Chamyal
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160811/f8534684/attachment.html>
More information about the awt-dev
mailing list