<AWT Dev> [9] Review request for 8075244 [macosx] The fix for JDK-8043869 should be reworked

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Wed Mar 18 14:53:42 UTC 2015


Could you review the updated fix:

  - The check for SWT running is added to the SplashGetScaledImageName() 

On 3/17/2015 8:54 PM, Sergey Bylokhov wrote:
> Hi, Alexander.
> Can you check another call to sharedApplication in the 
> SplashInitPlatform(note that it is not a simple call to the method). 
> Is it possible to call backingScaleFactor after this?
     What we do is: detect scale factor, find high-resolution splash 
image, create splash and call SplashInitPlatform() with the splash as 
     There is no need to call SplashInitPlatform() if splash screen has 
not been found.

    SplashInitPlatform() does some staff with splash screen, checks to 
SWT and calls  [NSApplicationAWT sharedApplication] as
         [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^() {
             [NSApplicationAWT runAWTLoopWithApp:[NSApplicationAWT 

    It is possible  just call [NSApplicationAWT sharedApplication] on 
the main thread because SplashGetScaledImageName() method creates its 
own NSAutoreleasePool and does not need to restart the app.

> Will our splash screen work in case of JAVA_STARTED_ON_FIRST_THREAD = 
> true?

   No. This is because of the fix JDK-8039926 -spash:<image> can't be 
combined with -xStartOnFirstThread since JDK 7

  SplashScrean treats JAVA_STARTED_ON_FIRST_THREAD as running with SWT.

I have added the same check to the SplashGetScaledImageName() method.


> 17.03.15 4:27, Alexander Scherbatiy wrote:
>> Hello,
>> Could you review the fix:
>>   bug: https://bugs.openjdk.java.net/browse/JDK-8075244
>>   webrev: http://cr.openjdk.java.net/~alexsch/8075244/webrev.00
>>   [NSApplicationAWT sharedApplication] call is added for the 
>> application initialization.
>> Thanks,
>> Alexandr.

More information about the awt-dev mailing list