changeset 16470:93fbec877e52

8155682: Get rid of legacy Windows Flags for DX Reviewed-by: serb, jgodinez
author prr
date Mon, 09 May 2016 09:53:55 -0700
parents 1c101d82d192
children 43061a625cc6
files src/java.desktop/windows/classes/sun/java2d/windows/WindowsFlags.java src/java.desktop/windows/native/libawt/java2d/windows/WindowsFlags.cpp src/java.desktop/windows/native/libawt/java2d/windows/WindowsFlags.h
diffstat 3 files changed, 1 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/windows/classes/sun/java2d/windows/WindowsFlags.java	Mon May 09 08:50:20 2016 -0700
+++ b/src/java.desktop/windows/classes/sun/java2d/windows/WindowsFlags.java	Mon May 09 09:53:55 2016 -0700
@@ -55,8 +55,6 @@
      *               This flag can force us to use d3d
      *               anyway in these situations.  Or, this flag can force us to
      *               not use d3d in a situation where we would use it otherwise.
-     *      translAccelEnabled: usage: "-Dsun.java2d.translaccel=true"
-     *               equivalent to sun.java2d.d3d=true
      *      offscreenSharingEnabled: usage: "-Dsun.java2d.offscreenSharing=true"
      *               Turns on the ability to share a hardware-accelerated
      *               offscreen surface through the JAWT interface.  See
@@ -67,23 +65,6 @@
      *               without being very sure that we will be willing to support
      *               that API in the future regardless of other native
      *               rendering pipeline changes.
-     *      accelReset: usage: "-Dsun.java2d.accelReset"
-     *               This flag tells us to reset any persistent information
-     *               the display device acceleration characteristics so that
-     *               we are forced to retest these characteristics.  This flag
-     *               is primarily used for debugging purposes (to allow testing
-     *               of the persistent storage mechanisms) but may also be
-     *               needed by some users if, for example, a driver upgrade
-     *               may change the runtime characteristics and they want the
-     *               tests to be re-run.
-     *      checkRegistry: usage: "-Dsun.java2d.checkRegistry"
-     *               This flag tells us to output the current registry settings
-     *               (after our initialization) to the console.
-     *      disableRegistry: usage: "-Dsun.java2d.disableRegistry"
-     *               This flag tells us to disable all registry-related
-     *               activities.  It is mainly here for debugging purposes,
-     *               to allow us to see whether any runtime bugs are caused
-     *               by or related to registry problems.
      *      magPresent: usage: "-Djavax.accessibility.screen_magnifier_present"
      *               This flag is set either on the command line or in the
      *               properties file.  It tells Swing whether the user is
@@ -121,9 +102,6 @@
     private static boolean oglEnabled;
     private static boolean oglVerbose;
     private static boolean offscreenSharingEnabled;
-    private static boolean accelReset;
-    private static boolean checkRegistry;
-    private static boolean disableRegistry;
     private static boolean magPresent;
     private static boolean setHighDPIAware;
     // TODO: other flags, including nopixfmt
@@ -234,11 +212,6 @@
                 }
                 offscreenSharingEnabled =
                     getBooleanProp("sun.java2d.offscreenSharing", false);
-                accelReset = getBooleanProp("sun.java2d.accelReset", false);
-                checkRegistry =
-                    getBooleanProp("sun.java2d.checkRegistry", false);
-                disableRegistry =
-                    getBooleanProp("sun.java2d.disableRegistry", false);
                 String dpiOverride = System.getProperty("sun.java2d.dpiaware");
                 if (dpiOverride != null) {
                     setHighDPIAware = dpiOverride.equalsIgnoreCase("true");
@@ -265,22 +238,12 @@
         System.out.println("WindowsFlags (Java):");
         System.out.println("  ddEnabled: " + ddEnabled + "\n" +
                            "  ddOffscreenEnabled: " + ddOffscreenEnabled + "\n" +
-                           "  ddVramForced: " + ddVramForced + "\n" +
-                           "  ddLockEnabled: " + ddLockEnabled + "\n" +
-                           "  ddLockSet: " + ddLockSet + "\n" +
-                           "  ddBlitEnabled: " + ddBlitEnabled + "\n" +
-                           "  ddScaleEnabled: " + ddScaleEnabled + "\n" +
                            "  d3dEnabled: " + d3dEnabled + "\n" +
                            "  d3dSet: " + d3dSet + "\n" +
                            "  oglEnabled: " + oglEnabled + "\n" +
                            "  oglVerbose: " + oglVerbose + "\n" +
                            "  gdiBlitEnabled: " + gdiBlitEnabled + "\n" +
-                           "  translAccelEnabled: " + translAccelEnabled + "\n" +
-                           "  offscreenSharingEnabled: " + offscreenSharingEnabled + "\n" +
-                           "  accelReset: " + accelReset + "\n" +
-                           "  checkRegistry: " + checkRegistry + "\n" +
-                           "  disableRegistry: " + disableRegistry + "\n" +
-                           "  d3dTexBPP: " + d3dTexBpp);
+                           "  offscreenSharingEnabled: " + offscreenSharingEnabled);
         */
     }
 
@@ -304,10 +267,6 @@
         return gdiBlitEnabled;
     }
 
-    public static boolean isTranslucentAccelerationEnabled() {
-        return d3dEnabled;
-    }
-
     public static boolean isOffscreenSharingEnabled() {
         return offscreenSharingEnabled;
     }
--- a/src/java.desktop/windows/native/libawt/java2d/windows/WindowsFlags.cpp	Mon May 09 08:50:20 2016 -0700
+++ b/src/java.desktop/windows/native/libawt/java2d/windows/WindowsFlags.cpp	Mon May 09 09:53:55 2016 -0700
@@ -27,13 +27,10 @@
 #include "Trace.h"
 #include "WindowsFlags.h"
 
-BOOL      accelReset;         // reset registry 2d acceleration settings
 BOOL      useD3D = TRUE;      // d3d enabled flag
                               // initially is TRUE to allow D3D preloading
 BOOL      forceD3DUsage;      // force d3d on or off
 jboolean  g_offscreenSharing; // JAWT accelerated surface sharing
-BOOL      checkRegistry;      // Diagnostic tool: outputs 2d registry settings
-BOOL      disableRegistry;    // Diagnostic tool: disables registry interaction
 BOOL      setHighDPIAware;    // Whether to set the high-DPI awareness flag
 
 extern WCHAR *j2dAccelKey;       // Name of java2d root key
@@ -95,12 +92,6 @@
     g_offscreenSharing = GetStaticBoolean(env, wFlagsClass,
                                           "offscreenSharingEnabled");
     JNU_CHECK_EXCEPTION(env);
-    accelReset = GetStaticBoolean(env, wFlagsClass, "accelReset");
-    JNU_CHECK_EXCEPTION(env);
-    checkRegistry = GetStaticBoolean(env, wFlagsClass, "checkRegistry");
-    JNU_CHECK_EXCEPTION(env);
-    disableRegistry = GetStaticBoolean(env, wFlagsClass, "disableRegistry");
-    JNU_CHECK_EXCEPTION(env);
 
     setHighDPIAware =
         (IS_WINVISTA && GetStaticBoolean(env, wFlagsClass, "setHighDPIAware"));
@@ -113,12 +104,6 @@
                 (forceD3DUsage ? "true" : "false"));
     J2dTraceLn1(J2D_TRACE_INFO, "  offscreenSharing = %s",
                 (g_offscreenSharing ? "true" : "false"));
-    J2dTraceLn1(J2D_TRACE_INFO, "  accelReset = %s",
-                (accelReset ? "true" : "false"));
-    J2dTraceLn1(J2D_TRACE_INFO, "  checkRegistry = %s",
-                (checkRegistry ? "true" : "false"));
-    J2dTraceLn1(J2D_TRACE_INFO, "  disableRegistry = %s",
-                (disableRegistry ? "true" : "false"));
     J2dTraceLn1(J2D_TRACE_INFO, "  setHighDPIAware = %s",
                 (setHighDPIAware ? "true" : "false"));
 }
--- a/src/java.desktop/windows/native/libawt/java2d/windows/WindowsFlags.h	Mon May 09 08:50:20 2016 -0700
+++ b/src/java.desktop/windows/native/libawt/java2d/windows/WindowsFlags.h	Mon May 09 09:53:55 2016 -0700
@@ -27,12 +27,9 @@
 #ifndef WINDOWSFLAGS_H
 #define WINDOWSFLAGS_H
 
-extern BOOL      accelReset;         // reset registry 2d acceleration settings
 extern BOOL      useD3D;             // d3d enabled flag
 extern BOOL      forceD3DUsage;      // force d3d on or off
 extern jboolean  g_offscreenSharing; // JAWT accelerated surface sharing
-extern BOOL      checkRegistry;      // Diag tool: outputs 2d registry settings
-extern BOOL      disableRegistry;    // Diag tool: disables registry interaction
 extern BOOL      setHighDPIAware;    // whether to set High DPI Aware flag on Vista
 
 void SetD3DEnabledFlag(JNIEnv *env, BOOL d3dEnabled, BOOL d3dSet);