6477756: GraphicsDevice.getConfigurations() is slow taking 3 or more seconds
authorvadim
Tue, 17 May 2016 21:50:13 +0300
changeset 38975 54b83c0b4333
parent 38974 32c15d7bbd56
child 38976 b65740a12906
6477756: GraphicsDevice.getConfigurations() is slow taking 3 or more seconds Reviewed-by: prr, serb
jdk/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp
--- a/jdk/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp	Tue May 17 14:31:12 2016 +0300
+++ b/jdk/src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp	Tue May 17 21:50:13 2016 +0300
@@ -929,6 +929,9 @@
     // Only want to call this once per session
     make_uns_ordered_dither_array(img_oda_alpha, 256);
 
+    // workaround JDK-6477756, ignore return value to keep dll in memory
+    JDK_LoadSystemLibrary("opengl32.dll");
+
     CATCH_BAD_ALLOC;
 }