7005896: Java2D D3D pipeline doesn't recognise latest Windows OSes
authorprr
Fri, 10 Dec 2010 16:14:04 -0800
changeset 7491 ba3dc59cd2fd
parent 7490 00910e31935b
child 7499 758efe934e7d
child 7745 ebd6382e93fd
7005896: Java2D D3D pipeline doesn't recognise latest Windows OSes Reviewed-by: bae, jgodinez
jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp
jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.h
--- a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp	Thu Dec 09 21:55:41 2010 -0800
+++ b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.cpp	Fri Dec 10 16:14:04 2010 -0800
@@ -349,7 +349,8 @@
 {
     // require Windows XP or newer client-class OS
     if (IS_WINVER_ATLEAST(5, 1) &&
-        !D3DPPLM_OsVersionMatches(OS_WINSERV_2008|OS_WINSERV_2003))
+        !D3DPPLM_OsVersionMatches(OS_WINSERV_2008R2|OS_WINSERV_2008|
+                                  OS_WINSERV_2003))
     {
         J2dTraceLn(J2D_TRACE_INFO,
                    "D3DPPLM::CheckOSVersion: Windows XP or newer client-classs"\
@@ -442,14 +443,22 @@
         if (bVersOk && osvi.dwPlatformId == VER_PLATFORM_WIN32_NT &&
             osvi.dwMajorVersion > 4)
         {
-            if (osvi.dwMajorVersion >= 6 && osvi.dwMinorVersion >= 0) {
+            if (osvi.dwMajorVersion >= 6 && osvi.dwMinorVersion == 0) {
                 if (osvi.wProductType == VER_NT_WORKSTATION) {
-                    J2dRlsTrace(J2D_TRACE_INFO, "OS_VISTA or newer\n");
+                    J2dRlsTrace(J2D_TRACE_INFO, "OS_VISTA\n");
                     currentOS = OS_VISTA;
                 } else {
-                    J2dRlsTrace(J2D_TRACE_INFO, "OS_WINSERV_2008 or newer\n");
+                    J2dRlsTrace(J2D_TRACE_INFO, "OS_WINSERV_2008\n");
                     currentOS = OS_WINSERV_2008;
                 }
+            } else if (osvi.dwMajorVersion >= 6 && osvi.dwMinorVersion >= 1) {
+                if (osvi.wProductType == VER_NT_WORKSTATION) {
+                    J2dRlsTrace(J2D_TRACE_INFO, "OS_WINDOWS7 or newer\n");
+                    currentOS = OS_WINDOWS7;
+                } else {
+                    J2dRlsTrace(J2D_TRACE_INFO, "OS_WINSERV_2008R2 or newer\n");
+                    currentOS = OS_WINSERV_2008R2;
+                }
             } else if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) {
                 if (osvi.wProductType == VER_NT_WORKSTATION) {
                     J2dRlsTrace(J2D_TRACE_INFO, "OS_WINXP_64\n");
--- a/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.h	Thu Dec 09 21:55:41 2010 -0800
+++ b/jdk/src/windows/native/sun/java2d/d3d/D3DPipelineManager.h	Fri Dec 10 16:14:04 2010 -0800
@@ -145,7 +145,10 @@
 #define OS_WINXP        (1 << 2)
 #define OS_WINXP_64     (1 << 3)
 #define OS_WINSERV_2003 (1 << 4)
-#define OS_ALL (OS_VISTA|OS_WINSERV_2008|OS_WINXP|OS_WINXP_64|OS_WINSERV_2003)
+#define OS_WINDOWS7     (1 << 5)
+#define OS_WINSERV_2008R2 (1 << 6)
+#define OS_ALL (OS_VISTA|OS_WINSERV_2008|OS_WINXP|OS_WINXP_64|OS_WINSERV_2003|\
+                OS_WINDOWS7|OS_WINSERV_2008R2)
 #define OS_UNKNOWN      (~OS_ALL)
 BOOL D3DPPLM_OsVersionMatches(USHORT osInfo);