# HG changeset patch # User serb # Date 1553671453 25200 # Node ID 2b0acaf92eccfbd0de4cafdfa0a9c48889038f46 # Parent b8a12f53226e354756a2886069c48cbc8fb5ef2d 8220517: Enhanced GIF support Reviewed-by: aivanov, ssahoo, mschoene, prr diff -r b8a12f53226e -r 2b0acaf92ecc src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m --- a/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m Thu Mar 07 22:19:12 2019 -0800 +++ b/src/java.desktop/macosx/native/libsplashscreen/splashscreen_sys.m Wed Mar 27 00:24:13 2019 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -214,7 +214,7 @@ splash->maskRequired = 0; - + //TODO: the following is too much of a hack but should work in 90% cases. // besides we don't use device-dependent drawing, so probably // that's very fine indeed @@ -282,9 +282,11 @@ SplashRedrawWindow(Splash * splash) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - SplashUpdateScreenData(splash); + [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ + // drop the reference to the old view and image + [splash->window setContentView: nil]; + SplashUpdateScreenData(splash); - [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ // NSDeviceRGBColorSpace vs. NSCalibratedRGBColorSpace ? NSBitmapImageRep * rep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes: (unsigned char**)&splash->screenData @@ -311,7 +313,7 @@ size.height /= scaleFactor; [image setSize: size]; } - + NSImageView * view = [[NSImageView alloc] init]; [view setImage: image];