< prev index next >

src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java

Print this page

        

*** 70,80 **** X11GraphicsConfig graphicsConfig; private RenderLoops solidloops; protected int depth; ! private static native void initIDs(Class<?> xorComp, boolean tryDGA); protected native void initSurface(int depth, int width, int height, long drawable); public static final String DESC_INT_BGR_X11 = "Integer BGR Pixmap"; --- 70,80 ---- X11GraphicsConfig graphicsConfig; private RenderLoops solidloops; protected int depth; ! 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";
*** 206,226 **** } 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); String xtextpipe = java.security.AccessController.doPrivileged (new sun.security.action.GetPropertyAction("sun.java2d.xtextpipe")); if (xtextpipe == null || "true".startsWith(xtextpipe)) { if ("true".equals(xtextpipe)) { --- 206,221 ---- } protected X11Renderer x11pipe; protected PixelToShapeConverter x11txpipe; protected static TextPipe x11textpipe; static { if (!isX11SurfaceDataInitialized() && !GraphicsEnvironment.isHeadless()) { ! 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,261 **** 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() { --- 232,249 ----
*** 275,288 **** 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())); } } } return accelerationEnabled.booleanValue(); } --- 263,275 ---- 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 we are local and shared memory Pixmaps ! // are not available. ! accelerationEnabled = !(isDisplayLocal && !isShmPMAvailable()); } } } return accelerationEnabled.booleanValue(); }
< prev index next >