<AWT Dev> <Swing Dev>[9] Review Request JDK-8151787 Unify the HiDPI splash screen image naming convention
Alexandr Scherbatiy
alexandr.scherbatiy at oracle.com
Tue Aug 16 16:41:56 UTC 2016
The fix looks good to me.
It would be better if a native speaker look at the documentation change
in the launcher.properties file.
Thanks,
Alexandr.
On 8/16/2016 8:26 AM, Rajeev Chamyal wrote:
>
> Hello Alexandr,
>
> Please review the updated webrev.
>
> http://cr.openjdk.java.net/~rchamyal/8151787/webrev.01/
> <http://cr.openjdk.java.net/%7Erchamyal/8151787/webrev.01/>
>
> Updates :
>
> 1)Updated the consition as suggested if(*scaleFactor -
> (int)*scaleFactor < 0.000001)
>
> 2)Includes the changes of
> src/java.desktop/unix/native/libsplashscreen/splashscreen_sys.c
>
> 3)+ //map the splash co-ordinates as per system scale
> + splash->x /= splash->scaleFactor;
> + splash->y /= splash->scaleFactor;
>
> This change is required only for windows and linux. As we use absolute
> system resolution for centring the splash on screen on these.
>
> i.e. if system resolution is 1920 X 1080(i.e. unscaled resolution) on
> windows and linux we use this for centring the splash on screen. For
> mac scaled resolution is used directly.
>
> Regards,
>
> Rajeev Chamyal
>
> *From:*Alexander Scherbatiy
> *Sent:* 11 August 2016 14:44
> *To:* Rajeev Chamyal; awt-dev at openjdk.java.net; Philip Race; Sergey
> Bylokhov
> *Subject:* Re: <AWT Dev> <Swing Dev>[9] Review Request JDK-8151787
> Unify the HiDPI splash screen image naming convention
>
> 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/20160816/c0929f7f/attachment.html>
More information about the awt-dev
mailing list