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

The following examples show how to use sun.awt.image.SunVolatileImage#flush() . 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: CGLGraphicsConfig.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
public VolatileImage createCompatibleVolatileImage(int width, int height,
                                                   int transparency,
                                                   int type) {
    if ((type != FBOBJECT && type != TEXTURE)
            || transparency == Transparency.BITMASK
            || type == FBOBJECT && !isCapPresent(CAPS_EXT_FBOBJECT)) {
        return null;
    }
    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 2
Source File: WGLGraphicsConfig.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if ((type != FBOBJECT && type != TEXTURE)
            || transparency == Transparency.BITMASK
            || type == FBOBJECT && !isCapPresent(CAPS_EXT_FBOBJECT)) {
        return null;
    }
    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 3
Source File: WGLGraphicsConfig.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 4
Source File: WGLGraphicsConfig.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 5
Source File: GLXGraphicsConfig.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 6
Source File: CGLGraphicsConfig.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public VolatileImage createCompatibleVolatileImage(int width, int height,
                                                   int transparency,
                                                   int type) {
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 7
Source File: GLXGraphicsConfig.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 8
Source File: WGLGraphicsConfig.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 9
Source File: D3DGraphicsConfig.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }
    boolean isOpaque = transparency == Transparency.OPAQUE;
    if (type == RT_TEXTURE) {
        int cap = isOpaque ? CAPS_RT_TEXTURE_OPAQUE : CAPS_RT_TEXTURE_ALPHA;
        if (!device.isCapPresent(cap)) {
            return null;
        }
    } else if (type == RT_PLAIN) {
        if (!isOpaque && !device.isCapPresent(CAPS_RT_PLAIN_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 10
Source File: GLXGraphicsConfig.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 11
Source File: CGLGraphicsConfig.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public VolatileImage createCompatibleVolatileImage(int width, int height,
                                                   int transparency,
                                                   int type) {
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 12
Source File: D3DGraphicsConfig.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }
    boolean isOpaque = transparency == Transparency.OPAQUE;
    if (type == RT_TEXTURE) {
        int cap = isOpaque ? CAPS_RT_TEXTURE_OPAQUE : CAPS_RT_TEXTURE_ALPHA;
        if (!device.isCapPresent(cap)) {
            return null;
        }
    } else if (type == RT_PLAIN) {
        if (!isOpaque && !device.isCapPresent(CAPS_RT_PLAIN_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 13
Source File: CGLGraphicsConfig.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public VolatileImage createCompatibleVolatileImage(int width, int height,
                                                   int transparency,
                                                   int type) {
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 14
Source File: GLXGraphicsConfig.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 15
Source File: WGLGraphicsConfig.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 16
Source File: D3DGraphicsConfig.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }
    boolean isOpaque = transparency == Transparency.OPAQUE;
    if (type == RT_TEXTURE) {
        int cap = isOpaque ? CAPS_RT_TEXTURE_OPAQUE : CAPS_RT_TEXTURE_ALPHA;
        if (!device.isCapPresent(cap)) {
            return null;
        }
    } else if (type == RT_PLAIN) {
        if (!isOpaque && !device.isCapPresent(CAPS_RT_PLAIN_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 17
Source File: CGLGraphicsConfig.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public VolatileImage createCompatibleVolatileImage(int width, int height,
                                                   int transparency,
                                                   int type) {
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 18
Source File: GLXGraphicsConfig.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 19
Source File: WGLGraphicsConfig.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }

    if (type == FBOBJECT) {
        if (!isCapPresent(CAPS_EXT_FBOBJECT)) {
            return null;
        }
    } else if (type == PBUFFER) {
        boolean isOpaque = transparency == Transparency.OPAQUE;
        if (!isOpaque && !isCapPresent(CAPS_STORED_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}
 
Example 20
Source File: D3DGraphicsConfig.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 *
 * @see sun.java2d.pipe.hw.AccelGraphicsConfig#createCompatibleVolatileImage
 */
@Override
public VolatileImage
    createCompatibleVolatileImage(int width, int height,
                                  int transparency, int type)
{
    if (type == FLIP_BACKBUFFER || type == WINDOW || type == UNDEFINED ||
        transparency == Transparency.BITMASK)
    {
        return null;
    }
    boolean isOpaque = transparency == Transparency.OPAQUE;
    if (type == RT_TEXTURE) {
        int cap = isOpaque ? CAPS_RT_TEXTURE_OPAQUE : CAPS_RT_TEXTURE_ALPHA;
        if (!device.isCapPresent(cap)) {
            return null;
        }
    } else if (type == RT_PLAIN) {
        if (!isOpaque && !device.isCapPresent(CAPS_RT_PLAIN_ALPHA)) {
            return null;
        }
    }

    SunVolatileImage vi = new AccelTypedVolatileImage(this, width, height,
                                                      transparency, type);
    Surface sd = vi.getDestSurface();
    if (!(sd instanceof AccelSurface) ||
        ((AccelSurface)sd).getType() != type)
    {
        vi.flush();
        vi = null;
    }

    return vi;
}