jdk/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java
changeset 47185 8d2a9073da00
parent 36874 09abfda883d2
--- a/jdk/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java	Tue Aug 22 09:41:11 2017 -0700
+++ b/jdk/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java	Wed Aug 23 09:28:08 2017 -0700
@@ -72,7 +72,7 @@
 
     protected int depth;
 
-    private static native void initIDs(Class<?> xorComp, boolean tryDGA);
+    private static native void initIDs(Class<?> xorComp);
     protected native void initSurface(int depth, int width, int height,
                                       long drawable);
 
@@ -208,17 +208,12 @@
     protected X11Renderer x11pipe;
     protected PixelToShapeConverter x11txpipe;
     protected static TextPipe x11textpipe;
-    protected static boolean dgaAvailable;
 
     static {
        if (!isX11SurfaceDataInitialized() &&
            !GraphicsEnvironment.isHeadless()) {
-            // If a screen magnifier is present, don't attempt to use DGA
-            String magPresent = java.security.AccessController.doPrivileged
-                (new sun.security.action.GetPropertyAction("javax.accessibility.screen_magnifier_present"));
-            boolean tryDGA = magPresent == null || !"true".equals(magPresent);
 
-            initIDs(XORComposite.class, tryDGA);
+            initIDs(XORComposite.class);
 
             String xtextpipe = java.security.AccessController.doPrivileged
                 (new sun.security.action.GetPropertyAction("sun.java2d.xtextpipe"));
@@ -239,8 +234,6 @@
                 x11textpipe = solidTextRenderer;
             }
 
-            dgaAvailable = isDgaAvailable();
-
             if (isAccelerationEnabled()) {
                 X11PMBlitLoops.register();
                 X11PMBlitBgLoops.register();
@@ -249,11 +242,6 @@
     }
 
     /**
-     * Returns true if we can use DGA on any of the screens
-     */
-    public static native boolean isDgaAvailable();
-
-    /**
      * Returns true if shared memory pixmaps are available
      */
     private static native boolean isShmPMAvailable();
@@ -277,10 +265,9 @@
                      }
 
                     // EXA based drivers tend to place pixmaps in VRAM, slowing down readbacks.
-                    // Don't use pixmaps if dga is available,
-                    // or we are local and shared memory Pixmaps are not available.
-                    accelerationEnabled =
-                        !(isDgaAvailable() || (isDisplayLocal && !isShmPMAvailable()));
+                    // Don't use pixmaps if we are local and shared memory Pixmaps
+                    // are not available.
+                    accelerationEnabled = !(isDisplayLocal && !isShmPMAvailable());
                 }
             }
         }