11/*
2- * Copyright (c) 2003, 2024 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -55,16 +55,6 @@ public class WindowsFlags {
5555 * This flag can force us to use d3d
5656 * anyway in these situations. Or, this flag can force us to
5757 * not use d3d in a situation where we would use it otherwise.
58- * offscreenSharingEnabled: usage: "-Dsun.java2d.offscreenSharing=true"
59- * Turns on the ability to share a hardware-accelerated
60- * offscreen surface through the JAWT interface. See
61- * src/windows/native/sun/windows/awt_DrawingSurface.* for
62- * more information. This capability is disabled by default
63- * pending more testing and time to work out the right
64- * solution; we do not want to expose more public JAWT api
65- * without being very sure that we will be willing to support
66- * that API in the future regardless of other native
67- * rendering pipeline changes.
6858 * magPresent: usage: "-Djavax.accessibility.screen_magnifier_present"
6959 * This flag is set either on the command line or in the
7060 * properties file. It tells Swing whether the user is
@@ -101,7 +91,6 @@ public class WindowsFlags {
10191 private static boolean d3dOnScreenEnabled ;
10292 private static boolean oglEnabled ;
10393 private static boolean oglVerbose ;
104- private static boolean offscreenSharingEnabled ;
10594 private static boolean magPresent ;
10695 private static boolean setHighDPIAware ;
10796 // TODO: other flags, including nopixfmt
@@ -206,8 +195,6 @@ private static void initJavaFlags() {
206195 if (d3dSet ) {
207196 d3dVerbose = isBooleanPropTrueVerbose ("sun.java2d.d3d" );
208197 }
209- offscreenSharingEnabled =
210- getBooleanProp ("sun.java2d.offscreenSharing" , false );
211198 String dpiOverride = System .getProperty ("sun.java2d.dpiaware" );
212199 if (dpiOverride != null ) {
213200 setHighDPIAware = dpiOverride .equalsIgnoreCase ("true" );
@@ -217,16 +204,6 @@ private static void initJavaFlags() {
217204 setHighDPIAware =
218205 sunLauncherProperty .equalsIgnoreCase ("SUN_STANDARD" );
219206 }
220- /*
221- // Output info based on some non-default flags:
222- if (offscreenSharingEnabled) {
223- System.out.println(
224- "Warning: offscreenSharing has been enabled. " +
225- "The use of this capability will change in future " +
226- "releases and applications that depend on it " +
227- "may not work correctly");
228- }
229- */
230207 /*
231208 System.out.println("WindowsFlags (Java):");
232209 System.out.println(" ddEnabled: " + ddEnabled + "\n" +
@@ -235,8 +212,7 @@ private static void initJavaFlags() {
235212 " d3dSet: " + d3dSet + "\n" +
236213 " oglEnabled: " + oglEnabled + "\n" +
237214 " oglVerbose: " + oglVerbose + "\n" +
238- " gdiBlitEnabled: " + gdiBlitEnabled + "\n" +
239- " offscreenSharingEnabled: " + offscreenSharingEnabled);
215+ " gdiBlitEnabled: " + gdiBlitEnabled);
240216 */
241217 }
242218
@@ -260,10 +236,6 @@ public static boolean isGdiBlitEnabled() {
260236 return gdiBlitEnabled ;
261237 }
262238
263- public static boolean isOffscreenSharingEnabled () {
264- return offscreenSharingEnabled ;
265- }
266-
267239 public static boolean isMagPresent () {
268240 return magPresent ;
269241 }
0 commit comments