sun.java2d.SurfaceDataProxy Java Examples

The following examples show how to use sun.java2d.SurfaceDataProxy. 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: SurfaceManager.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #2
Source File: SurfaceManager.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #3
Source File: SurfaceManager.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #4
Source File: SurfaceManager.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #5
Source File: SurfaceManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #6
Source File: SurfaceManager.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #7
Source File: SurfaceManager.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #8
Source File: SurfaceManager.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #9
Source File: SurfaceManager.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public boolean isAccelerated() {
    // Note that when img.getAccelerationPriority() gets set to 0
    // we remove SurfaceDataProxy objects from the cache and the
    // answer will be false.
    GraphicsConfiguration tmpGc = gc;
    if (tmpGc == null) {
        tmpGc = GraphicsEnvironment.getLocalGraphicsEnvironment().
            getDefaultScreenDevice().getDefaultConfiguration();
    }
    if (tmpGc instanceof ProxiedGraphicsConfig) {
        Object proxyKey =
            ((ProxiedGraphicsConfig) tmpGc).getProxyKey();
        if (proxyKey != null) {
            SurfaceDataProxy sdp =
                (SurfaceDataProxy) getCacheData(proxyKey);
            return (sdp != null && sdp.isAccelerated());
        }
    }
    return false;
}
 
Example #10
Source File: D3DSurfaceDataProxy.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           D3DGraphicsConfig dstConfig)
{
    if (srcData instanceof D3DSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new D3DSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #11
Source File: OGLSurfaceDataProxy.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #12
Source File: OGLSurfaceDataProxy.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #13
Source File: XRSurfaceDataProxy.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
        XRGraphicsConfig dstConfig) {

    /*Don't cache already native surfaces*/
    if (srcData instanceof XRSurfaceData) {
        return UNCACHED;
    }

    return new XRSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #14
Source File: OGLSurfaceDataProxy.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #15
Source File: XRSurfaceDataProxy.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
        XRGraphicsConfig dstConfig) {

    /*Don't cache already native surfaces*/
    if (srcData instanceof XRSurfaceData) {
        return UNCACHED;
    }

    return new XRSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #16
Source File: D3DSurfaceDataProxy.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           D3DGraphicsConfig dstConfig)
{
    if (srcData instanceof D3DSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new D3DSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #17
Source File: XRSurfaceDataProxy.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
        XRGraphicsConfig dstConfig) {

    /*Don't cache already native surfaces*/
    if (srcData instanceof XRSurfaceData) {
        return UNCACHED;
    }

    return new XRSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #18
Source File: OGLSurfaceDataProxy.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #19
Source File: D3DSurfaceDataProxy.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           D3DGraphicsConfig dstConfig)
{
    if (srcData instanceof D3DSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new D3DSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #20
Source File: XRSurfaceDataProxy.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
        XRGraphicsConfig dstConfig) {

    /*Don't cache already native surfaces*/
    if (srcData instanceof XRSurfaceData) {
        return UNCACHED;
    }

    return new XRSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #21
Source File: OGLSurfaceDataProxy.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #22
Source File: D3DSurfaceDataProxy.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           D3DGraphicsConfig dstConfig)
{
    if (srcData instanceof D3DSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new D3DSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #23
Source File: D3DSurfaceDataProxy.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           D3DGraphicsConfig dstConfig)
{
    if (srcData instanceof D3DSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new D3DSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #24
Source File: XRSurfaceDataProxy.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
        XRGraphicsConfig dstConfig) {

    /*Don't cache already native surfaces*/
    if (srcData instanceof XRSurfaceData) {
        return UNCACHED;
    }

    return new XRSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #25
Source File: XRSurfaceDataProxy.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
        XRGraphicsConfig dstConfig) {

    /*Don't cache already native surfaces*/
    if (srcData instanceof XRSurfaceData) {
        return UNCACHED;
    }

    return new XRSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #26
Source File: OGLSurfaceDataProxy.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #27
Source File: OGLSurfaceDataProxy.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #28
Source File: D3DSurfaceDataProxy.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           D3DGraphicsConfig dstConfig)
{
    if (srcData instanceof D3DSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new D3DSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #29
Source File: XRSurfaceDataProxy.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
        XRGraphicsConfig dstConfig) {

    /*Don't cache already native surfaces*/
    if (srcData instanceof XRSurfaceData) {
        return UNCACHED;
    }

    return new XRSurfaceDataProxy(dstConfig, srcData.getTransparency());
}
 
Example #30
Source File: OGLSurfaceDataProxy.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public static SurfaceDataProxy createProxy(SurfaceData srcData,
                                           OGLGraphicsConfig dstConfig)
{
    if (srcData instanceof OGLSurfaceData) {
        // srcData must be a VolatileImage which either matches
        // our pixel format or not - either way we do not cache it...
        return UNCACHED;
    }

    return new OGLSurfaceDataProxy(dstConfig, srcData.getTransparency());
}