Search in sources :

Example 1 with AccelTypedVolatileImage

use of sun.java2d.pipe.hw.AccelTypedVolatileImage in project jdk8u_jdk by JetBrains.

the class GLXGraphicsConfig method createCompatibleVolatileImage.

/**
     * {@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;
}
Also used : AccelSurface(sun.java2d.pipe.hw.AccelSurface) SunVolatileImage(sun.awt.image.SunVolatileImage) AccelTypedVolatileImage(sun.java2d.pipe.hw.AccelTypedVolatileImage) Surface(sun.java2d.Surface) AccelSurface(sun.java2d.pipe.hw.AccelSurface)

Example 2 with AccelTypedVolatileImage

use of sun.java2d.pipe.hw.AccelTypedVolatileImage in project jdk8u_jdk by JetBrains.

the class D3DGraphicsConfig method createCompatibleVolatileImage.

/**
     * {@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;
}
Also used : AccelSurface(sun.java2d.pipe.hw.AccelSurface) SunVolatileImage(sun.awt.image.SunVolatileImage) AccelTypedVolatileImage(sun.java2d.pipe.hw.AccelTypedVolatileImage) Surface(sun.java2d.Surface) AccelSurface(sun.java2d.pipe.hw.AccelSurface)

Example 3 with AccelTypedVolatileImage

use of sun.java2d.pipe.hw.AccelTypedVolatileImage in project jdk8u_jdk by JetBrains.

the class CGLGraphicsConfig method 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;
}
Also used : AccelSurface(sun.java2d.pipe.hw.AccelSurface) SunVolatileImage(sun.awt.image.SunVolatileImage) AccelTypedVolatileImage(sun.java2d.pipe.hw.AccelTypedVolatileImage) Surface(sun.java2d.Surface) AccelSurface(sun.java2d.pipe.hw.AccelSurface)

Example 4 with AccelTypedVolatileImage

use of sun.java2d.pipe.hw.AccelTypedVolatileImage in project jdk8u_jdk by JetBrains.

the class WGLGraphicsConfig method createCompatibleVolatileImage.

/**
     * {@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;
}
Also used : AccelSurface(sun.java2d.pipe.hw.AccelSurface) SunVolatileImage(sun.awt.image.SunVolatileImage) AccelTypedVolatileImage(sun.java2d.pipe.hw.AccelTypedVolatileImage) Surface(sun.java2d.Surface) AccelSurface(sun.java2d.pipe.hw.AccelSurface)

Aggregations

SunVolatileImage (sun.awt.image.SunVolatileImage)4 Surface (sun.java2d.Surface)4 AccelSurface (sun.java2d.pipe.hw.AccelSurface)4 AccelTypedVolatileImage (sun.java2d.pipe.hw.AccelTypedVolatileImage)4