< prev index next >
src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java
Print this page
@@ -70,11 +70,11 @@
X11GraphicsConfig graphicsConfig;
private RenderLoops solidloops;
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);
public static final String
DESC_INT_BGR_X11 = "Integer BGR Pixmap";
@@ -211,16 +211,12 @@
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"));
if (xtextpipe == null || "true".startsWith(xtextpipe)) {
if ("true".equals(xtextpipe)) {
@@ -237,25 +233,18 @@
System.out.println("using DGA text renderer");
}
x11textpipe = solidTextRenderer;
}
- dgaAvailable = isDgaAvailable();
-
if (isAccelerationEnabled()) {
X11PMBlitLoops.register();
X11PMBlitBgLoops.register();
}
}
}
/**
- * 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();
public static boolean isAccelerationEnabled() {
@@ -275,14 +264,13 @@
if (ge instanceof SunGraphicsEnvironment) {
isDisplayLocal = ((SunGraphicsEnvironment) ge).isDisplayLocal();
}
// 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());
}
}
}
return accelerationEnabled.booleanValue();
}
< prev index next >