提交 a453be93 编写于 作者: S serb

8220517: Enhanced GIF support

Reviewed-by: aivanov, ssahoo, mschoene, prr
上级 aff987a7
/* /*
* Copyright (c) 2011, 2013, 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -184,7 +184,7 @@ SplashInitPlatform(Splash * splash) { ...@@ -184,7 +184,7 @@ SplashInitPlatform(Splash * splash) {
splash->maskRequired = 0; splash->maskRequired = 0;
//TODO: the following is too much of a hack but should work in 90% cases. //TODO: the following is too much of a hack but should work in 90% cases.
// besides we don't use device-dependant drawing, so probably // besides we don't use device-dependant drawing, so probably
// that's very fine indeed // that's very fine indeed
...@@ -251,9 +251,11 @@ void ...@@ -251,9 +251,11 @@ void
SplashRedrawWindow(Splash * splash) { SplashRedrawWindow(Splash * splash) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
SplashUpdateScreenData(splash);
[JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){ [JNFRunLoop performOnMainThreadWaiting:YES withBlock:^(){
// drop the reference to the old view and image
[splash->window setContentView: nil];
SplashUpdateScreenData(splash);
// NSDeviceRGBColorSpace vs. NSCalibratedRGBColorSpace ? // NSDeviceRGBColorSpace vs. NSCalibratedRGBColorSpace ?
NSBitmapImageRep * rep = [[NSBitmapImageRep alloc] NSBitmapImageRep * rep = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes: (unsigned char**)&splash->screenData initWithBitmapDataPlanes: (unsigned char**)&splash->screenData
...@@ -281,7 +283,7 @@ SplashRedrawWindow(Splash * splash) { ...@@ -281,7 +283,7 @@ SplashRedrawWindow(Splash * splash) {
size.height /= scaleFactor; size.height /= scaleFactor;
[image setSize: size]; [image setSize: size];
} }
NSImageView * view = [[NSImageView alloc] init]; NSImageView * view = [[NSImageView alloc] init];
[view setImage: image]; [view setImage: image];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册