8042609: Limit splashiness of splash images
authorazvegint
Fri, 30 May 2014 16:09:49 +0400
changeset 27079 05150f708e53
parent 27078 39275d6a8cac
child 27080 4c4cdbcd69b5
8042609: Limit splashiness of splash images Reviewed-by: mschoene, serb
jdk/src/java.desktop/windows/native/libsplashscreen/splashscreen_sys.c
--- a/jdk/src/java.desktop/windows/native/libsplashscreen/splashscreen_sys.c	Wed May 28 14:51:24 2014 +0100
+++ b/jdk/src/java.desktop/windows/native/libsplashscreen/splashscreen_sys.c	Fri May 30 16:09:49 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, 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
@@ -213,6 +213,14 @@
 void
 SplashRedrawWindow(Splash * splash)
 {
+    if (!SplashIsStillLooping(splash)) {
+        KillTimer(splash->hWnd, 0);
+    }
+
+    if (splash->currentFrame < 0) {
+        return;
+    }
+
     SplashUpdateScreenData(splash);
     if (splash->isLayered) {
         BLENDFUNCTION bf;
@@ -303,9 +311,6 @@
             time = 0;
         SetTimer(splash->hWnd, 0, time, NULL);
     }
-    else {
-        KillTimer(splash->hWnd, 0);
-    }
 }
 
 void SplashReconfigureNow(Splash * splash) {