<AWT Dev> [9] Review request for 8043869 [macosx] java -splash does not honor @2x hi dpi notation for retina support
-Robin-
robin.stevens at scz.be
Mon May 23 11:22:07 UTC 2016
Hello Alexander,
Alexandr Scherbatiy wrote
> Could you review the updated fix:
> http://cr.openjdk.java.net/~alexsch/8043869/webrev.03/
I think this change caused a bug in the SplashScreen#getBounds method
(SplashScreen.java file) when a high-dpi splash screen is available and
scale > 1.
if (0 < scale && scale != 1) {
bounds.setSize((int) (bounds.getWidth() / scale),
(int) (bounds.getWidth() / scale));
}
I think that in the above code, the second getWidth() should be replaced by
a call to getHeight(), resulting in:
if (0 < scale && scale != 1) {
bounds.setSize((int) (bounds.getWidth() / scale),
(int) (bounds.getHeight() / scale));
}
If not, the getBounds method will always return square bounds, even when the
splash screen is a rectangle where width != height.
This problem is not detected by the MultiResolutionSplashTest.java. I think
the test would detect this problem if the
MultiResolutionSplashTest#testSplash is updated to include the following
check:
if ( splashScreen.getBounds().getWidth() != IMAGE_WIDTH ){
throw new RuntimeException( "Splash screen width is incorrect" );
}
if ( splashScreen.getBounds().getHeight() != IMAGE_HEIGHT ){
throw new RuntimeException( "Splash screen height is incorrect" );
}
Robin
--
View this message in context: http://openjdk.5641.n7.nabble.com/AWT-Dev-9-Review-request-for-8043869-macosx-java-splash-does-not-honor-2x-hi-dpi-notation-for-retinat-tp192308p272361.html
Sent from the OpenJDK AWT Development mailing list archive at Nabble.com.
More information about the awt-dev
mailing list