<AWT Dev> <Swing Dev> Review Request JDK-8151787 Unify the HiDPI splash screen image naming convention
alexandr.scherbatiy at oracle.com
Wed Aug 10 15:24:03 UTC 2016
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/
> 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
> 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
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?
> Rajeev Chamyal
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev