Java Code Examples for sun.awt.windows.WComponentPeer#getColorModel()
The following examples show how to use
sun.awt.windows.WComponentPeer#getColorModel() .
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: D3DSurfaceData.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example 2
Source File: WGLSurfaceData.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Creates a SurfaceData object representing the back buffer of a * double-buffered on-screen Window. */ public static WGLOffScreenSurfaceData createData(WComponentPeer peer, Image image, int type) { // the OGL pipeline can render directly to the screen and interfere // with layered windows, which is why we don't allow accelerated // surfaces in this case if (!peer.isAccelCapable() || !SunToolkit.isContainingTopLevelOpaque((Component)peer.getTarget())) { return null; } WGLGraphicsConfig gc = getGC(peer); Rectangle r = peer.getBounds(); if (type == FLIP_BACKBUFFER) { return new WGLOffScreenSurfaceData(peer, gc, r.width, r.height, image, peer.getColorModel(), type); } else { return new WGLVSyncOffScreenSurfaceData(peer, gc, r.width, r.height, image, peer.getColorModel(), type); } }
Example 3
Source File: D3DSurfaceData.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example 4
Source File: D3DSurfaceData.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example 5
Source File: D3DSurfaceData.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example 6
Source File: D3DSurfaceData.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example 7
Source File: D3DSurfaceData.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * 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); }
Example 8
Source File: WGLSurfaceData.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Creates a SurfaceData object representing the back buffer of a * double-buffered on-screen Window. */ public static WGLOffScreenSurfaceData createData(WComponentPeer peer, Image image, int type) { // the OGL pipeline can render directly to the screen and interfere // with layered windows, which is why we don't allow accelerated // surfaces in this case if (!peer.isAccelCapable() || !SunToolkit.isContainingTopLevelOpaque((Component)peer.getTarget())) { return null; } WGLGraphicsConfig gc = getGC(peer); Rectangle r = peer.getBounds(); if (type == FLIP_BACKBUFFER) { return new WGLOffScreenSurfaceData(peer, gc, r.width, r.height, image, peer.getColorModel(), type); } else { return new WGLVSyncOffScreenSurfaceData(peer, gc, r.width, r.height, image, peer.getColorModel(), type); } }
Example 9
Source File: WGLSurfaceData.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Creates a SurfaceData object representing the back buffer of a * double-buffered on-screen Window. */ public static WGLOffScreenSurfaceData createData(WComponentPeer peer, Image image, int type) { // the OGL pipeline can render directly to the screen and interfere // with layered windows, which is why we don't allow accelerated // surfaces in this case if (!peer.isAccelCapable() || !SunToolkit.isContainingTopLevelOpaque((Component)peer.getTarget())) { return null; } WGLGraphicsConfig gc = getGC(peer); Rectangle r = peer.getBounds(); if (type == FLIP_BACKBUFFER) { return new WGLOffScreenSurfaceData(peer, gc, r.width, r.height, image, peer.getColorModel(), type); } else { return new WGLVSyncOffScreenSurfaceData(peer, gc, r.width, r.height, image, peer.getColorModel(), type); } }
Example 10
Source File: D3DSurfaceData.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public D3DWindowSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc) { super(peer, gc, peer.getBounds().width, peer.getBounds().height, null, peer.getColorModel(), 1, SWAP_COPY, VSYNC_DEFAULT, WINDOW); dirtyTracker = getStateTracker(); }
Example 11
Source File: D3DSurfaceData.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public D3DWindowSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc) { super(peer, gc, peer.getBounds().width, peer.getBounds().height, null, peer.getColorModel(), 1, SWAP_COPY, VSYNC_DEFAULT, WINDOW); dirtyTracker = getStateTracker(); }
Example 12
Source File: D3DSurfaceData.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
public D3DWindowSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc) { super(peer, gc, peer.getBounds().width, peer.getBounds().height, null, peer.getColorModel(), 1, SWAP_COPY, VSYNC_DEFAULT, WINDOW); dirtyTracker = getStateTracker(); }
Example 13
Source File: D3DSurfaceData.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
public D3DWindowSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc) { super(peer, gc, peer.getBounds().width, peer.getBounds().height, null, peer.getColorModel(), 1, SWAP_COPY, VSYNC_DEFAULT, WINDOW); dirtyTracker = getStateTracker(); }
Example 14
Source File: D3DSurfaceData.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public D3DWindowSurfaceData(WComponentPeer peer, D3DGraphicsConfig gc) { super(peer, gc, peer.getBounds().width, peer.getBounds().height, null, peer.getColorModel(), 1, SWAP_COPY, VSYNC_DEFAULT, WINDOW); dirtyTracker = getStateTracker(); }
Example 15
Source File: WGLSurfaceData.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
public WGLWindowSurfaceData(WComponentPeer peer, WGLGraphicsConfig gc) { super(peer, gc, peer.getColorModel(), WINDOW); }
Example 16
Source File: WGLSurfaceData.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
public WGLWindowSurfaceData(WComponentPeer peer, WGLGraphicsConfig gc) { super(peer, gc, peer.getColorModel(), WINDOW); }
Example 17
Source File: WGLSurfaceData.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
public WGLWindowSurfaceData(WComponentPeer peer, WGLGraphicsConfig gc) { super(peer, gc, peer.getColorModel(), WINDOW); }
Example 18
Source File: WGLSurfaceData.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
public WGLWindowSurfaceData(WComponentPeer peer, WGLGraphicsConfig gc) { super(peer, gc, peer.getColorModel(), WINDOW); }
Example 19
Source File: WGLSurfaceData.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
public WGLWindowSurfaceData(WComponentPeer peer, WGLGraphicsConfig gc) { super(peer, gc, peer.getColorModel(), WINDOW); }
Example 20
Source File: WGLSurfaceData.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
public WGLWindowSurfaceData(WComponentPeer peer, WGLGraphicsConfig gc) { super(peer, gc, peer.getColorModel(), WINDOW); }