sun.java2d.xr.XRSurfaceData Java Examples

The following examples show how to use sun.java2d.xr.XRSurfaceData. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: X11GraphicsEnvironment.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #2
Source File: X11GraphicsEnvironment.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #3
Source File: X11GraphicsEnvironment.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #4
Source File: X11GraphicsEnvironment.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #5
Source File: X11GraphicsEnvironment.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #6
Source File: X11GraphicsEnvironment.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #7
Source File: X11GraphicsEnvironment.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #8
Source File: X11GraphicsEnvironment.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #9
Source File: X11GraphicsEnvironment.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #10
Source File: X11GraphicsEnvironment.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #11
Source File: X11GraphicsEnvironment.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        wayland = System.getenv("WAYLAND_DISPLAY") != null;

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            // Do not use Xrender on Wayland
            if (!wayland) {
                xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
                if (xRenderVerbose && !xRenderAvailable) {
                    System.out.println(
                            "Could not enable XRender pipeline");
                }
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #12
Source File: X11GraphicsEnvironment.java    From jdk8u-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}
 
Example #13
Source File: X11GraphicsEnvironment.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
public Object run() {
    System.loadLibrary("awt");

    /*
     * Note: The MToolkit object depends on the static initializer
     * of X11GraphicsEnvironment to initialize the connection to
     * the X11 server.
     */
    if (!isHeadless()) {
        // first check the OGL system property
        boolean glxRequested = false;
        String prop = System.getProperty("sun.java2d.opengl");
        if (prop != null) {
            if (prop.equals("true") || prop.equals("t")) {
                glxRequested = true;
            } else if (prop.equals("True") || prop.equals("T")) {
                glxRequested = true;
                glxVerbose = true;
            }
        }

        // Now check for XRender system property
        boolean xRenderRequested = true;
        boolean xRenderIgnoreLinuxVersion = false;
        String xProp = System.getProperty("sun.java2d.xrender");
            if (xProp != null) {
            if (xProp.equals("false") || xProp.equals("f")) {
                xRenderRequested = false;
            } else if (xProp.equals("True") || xProp.equals("T")) {
                xRenderRequested = true;
                xRenderVerbose = true;
            }

            if(xProp.equalsIgnoreCase("t") || xProp.equalsIgnoreCase("true")) {
                xRenderIgnoreLinuxVersion = true;
            }
        }

        // initialize the X11 display connection
        initDisplay(glxRequested);

        // only attempt to initialize GLX if it was requested
        if (glxRequested) {
            glxAvailable = initGLX();
            if (glxVerbose && !glxAvailable) {
                System.out.println(
                    "Could not enable OpenGL " +
                    "pipeline (GLX 1.3 not available)");
            }
        }

        // only attempt to initialize Xrender if it was requested
        if (xRenderRequested) {
            xRenderAvailable = initXRender(xRenderVerbose, xRenderIgnoreLinuxVersion);
            if (xRenderVerbose && !xRenderAvailable) {
                System.out.println(
                             "Could not enable XRender pipeline");
            }
        }

        if (xRenderAvailable) {
            XRSurfaceData.initXRSurfaceData();
        }
    }

    return null;
}