Java 类sun.java2d.pipe.hw.ExtendedBufferCapabilities.VSyncType 实例源码

项目:OpenJSharp    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:jdk8u-jdk    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:openjdk-jdk10    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:openjdk9    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:jdk8u_jdk    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:lookaside_java-1.8.0-openjdk    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:infobip-open-jdk-8    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:jdk8u-dev-jdk    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:jdk7-jdk    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:openjdk-source-code-learn    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:OLD-OpenJDK8    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:openjdk-jdk7u-jdk    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:openjdk-icedtea7    文件:D3DSurfaceData.java   
/**
 * Creates a SurfaceData object representing the back buffer of a
 * double-buffered on-screen Window.
 */
public static D3DSurfaceData createData(WComponentPeer peer, Image image) {
    D3DGraphicsConfig gc = getGC(peer);
    if (gc == null || !peer.isAccelCapable()) {
        return null;
    }
    BufferCapabilities caps = peer.getBackBufferCaps();
    VSyncType vSyncType = VSYNC_DEFAULT;
    if (caps instanceof ExtendedBufferCapabilities) {
        vSyncType = ((ExtendedBufferCapabilities)caps).getVSync();
    }
    Rectangle r = peer.getBounds();
    BufferCapabilities.FlipContents flip = caps.getFlipContents();
    int swapEffect;
    if (flip == FlipContents.COPIED) {
        swapEffect = SWAP_COPY;
    } else if (flip == FlipContents.PRIOR) {
        swapEffect = SWAP_FLIP;
    } else { // flip == FlipContents.UNDEFINED || .BACKGROUND
        swapEffect = SWAP_DISCARD;
    }
    return new D3DSurfaceData(peer, gc, r.width, r.height,
                              image, peer.getColorModel(),
                              peer.getBackBuffersNum(),
                              swapEffect, vSyncType, FLIP_BACKBUFFER);
}
项目:OpenJSharp    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:jdk8u-jdk    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:lookaside_java-1.8.0-openjdk    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:infobip-open-jdk-8    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:jdk8u-dev-jdk    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:jdk7-jdk    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:openjdk-source-code-learn    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:OLD-OpenJDK8    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:openjdk-jdk7u-jdk    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:openjdk-icedtea7    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.peer = peer;
    this.type = type;
    this.width = width;
    this.height = height;
    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), width, height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:openjdk-jdk10    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.scaleX = type == TEXTURE ? 1 : graphicsDevice.getDefaultScaleX();
    this.scaleY = type == TEXTURE ? 1 : graphicsDevice.getDefaultScaleY();
    this.peer = peer;
    this.type = type;

    if (scaleX == 1 && scaleY == 1) {
        this.width = width;
        this.height = height;
    } else if (peer instanceof WWindowPeer) {
        Dimension scaledSize = ((WWindowPeer) peer).getScaledWindowSize();
        this.width = scaledSize.width;
        this.height = scaledSize.height;
    } else {
        this.width = (int) Math.ceil(width * scaleX);
        this.height = (int) Math.ceil(height * scaleY);
    }

    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), this.width, this.height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:openjdk9    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.scaleX = type == TEXTURE ? 1 : graphicsDevice.getDefaultScaleX();
    this.scaleY = type == TEXTURE ? 1 : graphicsDevice.getDefaultScaleY();
    this.peer = peer;
    this.type = type;

    if (scaleX == 1 && scaleY == 1) {
        this.width = width;
        this.height = height;
    } else if (peer instanceof WWindowPeer) {
        Dimension scaledSize = ((WWindowPeer) peer).getScaledWindowSize();
        this.width = scaledSize.width;
        this.height = scaledSize.height;
    } else {
        this.width = (int) Math.ceil(width * scaleX);
        this.height = (int) Math.ceil(height * scaleY);
    }

    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), this.width, this.height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}
项目:jdk8u_jdk    文件:D3DSurfaceData.java   
protected D3DSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc,
                         int width, int height, Image image,
                         ColorModel cm, int numBackBuffers,
                         int swapEffect, VSyncType vSyncType,
                         int type)
{
    super(getCustomSurfaceType(type), cm);
    this.graphicsDevice = gc.getD3DDevice();
    this.scaleX = type == TEXTURE ? 1 : graphicsDevice.getDefaultScaleX();
    this.scaleY = type == TEXTURE ? 1 : graphicsDevice.getDefaultScaleY();
    this.peer = peer;
    this.type = type;

    if (scaleX == 1 && scaleY == 1) {
        this.width = width;
        this.height = height;
    } else if (peer instanceof WWindowPeer) {
        Dimension scaledSize = ((WWindowPeer) peer).getScaledWindowSize();
        this.width = scaledSize.width;
        this.height = scaledSize.height;
    } else {
        this.width = (int) Math.ceil(width * scaleX);
        this.height = (int) Math.ceil(height * scaleY);
    }

    this.offscreenImage = image;
    this.backBuffersNum = numBackBuffers;
    this.swapEffect = swapEffect;
    this.syncType = vSyncType;

    initOps(graphicsDevice.getScreen(), this.width, this.height);
    if (type == WINDOW) {
        // we put the surface into the "lost"
        // state; it will be restored by the D3DScreenUpdateManager
        // prior to rendering to it for the first time. This is done
        // so that vram is not wasted for surfaces never rendered to
        setSurfaceLost(true);
    } else {
        initSurface();
    }
    setBlitProxyKey(gc.getProxyKey());
}