Java Code Examples for sun.awt.image.SunVolatileImage#getTransparency()

The following examples show how to use sun.awt.image.SunVolatileImage#getTransparency() . 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: CGLVolatileSurfaceManager.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public CGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    CGLGraphicsConfig gc = (CGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 2
Source File: X11VolatileSurfaceManager.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public X11VolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    // We only accelerated opaque vImages currently
    accelerationEnabled = X11SurfaceData.isAccelerationEnabled() &&
        (vImg.getTransparency() == Transparency.OPAQUE);

    if ((context != null) && !accelerationEnabled) {
        // if we're wrapping a backbuffer drawable, we must ensure that
        // the accelerated surface is initialized up front, regardless
        // of whether acceleration is enabled. But we need to set
        // the  accelerationEnabled field to true to reflect that this
        // SM is actually accelerated.
        accelerationEnabled = true;
        sdAccel = initAcceleratedSurface();
        sdCurrent = sdAccel;

        if (sdBackup != null) {
            // release the system memory backup surface, as we won't be
            // needing it in this case
            sdBackup = null;
        }
    }
}
 
Example 3
Source File: X11VolatileSurfaceManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public X11VolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    // We only accelerated opaque vImages currently
    accelerationEnabled = X11SurfaceData.isAccelerationEnabled() &&
        (vImg.getTransparency() == Transparency.OPAQUE);

    if ((context != null) && !accelerationEnabled) {
        // if we're wrapping a backbuffer drawable, we must ensure that
        // the accelerated surface is initialized up front, regardless
        // of whether acceleration is enabled. But we need to set
        // the  accelerationEnabled field to true to reflect that this
        // SM is actually accelerated.
        accelerationEnabled = true;
        sdAccel = initAcceleratedSurface();
        sdCurrent = sdAccel;

        if (sdBackup != null) {
            // release the system memory backup surface, as we won't be
            // needing it in this case
            sdBackup = null;
        }
    }
}
 
Example 4
Source File: WGLVolatileSurfaceManager.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public WGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    WGLGraphicsConfig gc = (WGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 5
Source File: D3DVolatileSurfaceManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public D3DVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    D3DGraphicsDevice gd = (D3DGraphicsDevice)
        vImg.getGraphicsConfig().getDevice();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        (transparency == Transparency.TRANSLUCENT &&
         (gd.isCapPresent(CAPS_RT_PLAIN_ALPHA) ||
          gd.isCapPresent(CAPS_RT_TEXTURE_ALPHA)));
}
 
Example 6
Source File: X11VolatileSurfaceManager.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public X11VolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    // We only accelerated opaque vImages currently
    accelerationEnabled = X11SurfaceData.isAccelerationEnabled() &&
        (vImg.getTransparency() == Transparency.OPAQUE);

    if ((context != null) && !accelerationEnabled) {
        // if we're wrapping a backbuffer drawable, we must ensure that
        // the accelerated surface is initialized up front, regardless
        // of whether acceleration is enabled. But we need to set
        // the  accelerationEnabled field to true to reflect that this
        // SM is actually accelerated.
        accelerationEnabled = true;
        sdAccel = initAcceleratedSurface();
        sdCurrent = sdAccel;

        if (sdBackup != null) {
            // release the system memory backup surface, as we won't be
            // needing it in this case
            sdBackup = null;
        }
    }
}
 
Example 7
Source File: X11VolatileSurfaceManager.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public X11VolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    // We only accelerated opaque vImages currently
    accelerationEnabled = X11SurfaceData.isAccelerationEnabled() &&
        (vImg.getTransparency() == Transparency.OPAQUE);

    if ((context != null) && !accelerationEnabled) {
        // if we're wrapping a backbuffer drawable, we must ensure that
        // the accelerated surface is initialized up front, regardless
        // of whether acceleration is enabled. But we need to set
        // the  accelerationEnabled field to true to reflect that this
        // SM is actually accelerated.
        accelerationEnabled = true;
        sdAccel = initAcceleratedSurface();
        sdCurrent = sdAccel;

        if (sdBackup != null) {
            // release the system memory backup surface, as we won't be
            // needing it in this case
            sdBackup = null;
        }
    }
}
 
Example 8
Source File: GLXVolatileSurfaceManager.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public GLXVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    GLXGraphicsConfig gc = (GLXGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 9
Source File: CGLVolatileSurfaceManager.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public CGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    CGLGraphicsConfig gc = (CGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 10
Source File: WGLVolatileSurfaceManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public WGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    WGLGraphicsConfig gc = (WGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 11
Source File: CGLVolatileSurfaceManager.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public CGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    CGLGraphicsConfig gc = (CGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 12
Source File: X11VolatileSurfaceManager.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public X11VolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    // We only accelerated opaque vImages currently
    accelerationEnabled = X11SurfaceData.isAccelerationEnabled() &&
        (vImg.getTransparency() == Transparency.OPAQUE);

    if ((context != null) && !accelerationEnabled) {
        // if we're wrapping a backbuffer drawable, we must ensure that
        // the accelerated surface is initialized up front, regardless
        // of whether acceleration is enabled. But we need to set
        // the  accelerationEnabled field to true to reflect that this
        // SM is actually accelerated.
        accelerationEnabled = true;
        sdAccel = initAcceleratedSurface();
        sdCurrent = sdAccel;

        if (sdBackup != null) {
            // release the system memory backup surface, as we won't be
            // needing it in this case
            sdBackup = null;
        }
    }
}
 
Example 13
Source File: GLXVolatileSurfaceManager.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public GLXVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    GLXGraphicsConfig gc = (GLXGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 14
Source File: WGLVolatileSurfaceManager.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public WGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    WGLGraphicsConfig gc = (WGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 15
Source File: D3DVolatileSurfaceManager.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public D3DVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    D3DGraphicsDevice gd = (D3DGraphicsDevice)
        vImg.getGraphicsConfig().getDevice();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        (transparency == Transparency.TRANSLUCENT &&
         (gd.isCapPresent(CAPS_RT_PLAIN_ALPHA) ||
          gd.isCapPresent(CAPS_RT_TEXTURE_ALPHA)));
}
 
Example 16
Source File: CGLVolatileSurfaceManager.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public CGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    CGLGraphicsConfig gc = (CGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 17
Source File: WGLVolatileSurfaceManager.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public WGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    WGLGraphicsConfig gc = (WGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 18
Source File: WGLVolatileSurfaceManager.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public WGLVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    WGLGraphicsConfig gc = (WGLGraphicsConfig)vImg.getGraphicsConfig();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        ((transparency == Transparency.TRANSLUCENT) &&
         (gc.isCapPresent(CAPS_EXT_FBOBJECT) ||
          gc.isCapPresent(CAPS_STORED_ALPHA)));
}
 
Example 19
Source File: D3DVolatileSurfaceManager.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public D3DVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is opaque OR
     *   - the image is translucent AND
     *       - the GraphicsConfig supports the FBO extension OR
     *       - the GraphicsConfig has a stored alpha channel
     */
    int transparency = vImg.getTransparency();
    D3DGraphicsDevice gd = (D3DGraphicsDevice)
        vImg.getGraphicsConfig().getDevice();
    accelerationEnabled =
        (transparency == Transparency.OPAQUE) ||
        (transparency == Transparency.TRANSLUCENT &&
         (gd.isCapPresent(CAPS_RT_PLAIN_ALPHA) ||
          gd.isCapPresent(CAPS_RT_TEXTURE_ALPHA)));
}
 
Example 20
Source File: GLXVolatileSurfaceManager.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public GLXVolatileSurfaceManager(SunVolatileImage vImg, Object context) {
    super(vImg, context);

    /*
     * We will attempt to accelerate this image only under the
     * following conditions:
     *   - the image is not bitmask AND the GraphicsConfig supports the FBO
     *     extension
     */
    int transparency = vImg.getTransparency();
    GLXGraphicsConfig gc = (GLXGraphicsConfig) vImg.getGraphicsConfig();
    accelerationEnabled = gc.isCapPresent(CAPS_EXT_FBOBJECT)
            && transparency != Transparency.BITMASK;
}