8155682: Get rid of legacy Windows Flags for DX

Reviewed-by: serb, jgodinez
This commit is contained in:
Phil Race 2016-05-09 09:53:55 -07:00
parent 7dd38808b9
commit 35d36c1c10
3 changed files with 1 additions and 60 deletions

View File

@ -55,8 +55,6 @@ public class WindowsFlags {
* 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 @@ public class WindowsFlags {
* 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 @@ public class WindowsFlags {
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 @@ public class WindowsFlags {
}
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 @@ public class WindowsFlags {
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 @@ public class WindowsFlags {
return gdiBlitEnabled;
}
public static boolean isTranslucentAccelerationEnabled() {
return d3dEnabled;
}
public static boolean isOffscreenSharingEnabled() {
return offscreenSharingEnabled;
}

View File

@ -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 @@ void GetFlagValues(JNIEnv *env, jclass wFlagsClass)
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 @@ void GetFlagValues(JNIEnv *env, jclass wFlagsClass)
(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"));
}

View File

@ -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);