Java Code Examples for java.awt.BufferCapabilities#isPageFlipping()
The following examples show how to use
java.awt.BufferCapabilities#isPageFlipping() .
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: GLXGraphicsConfig.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create a GLX-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * value of 1 is returned. */ @Override public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } // non-zero return value means backbuffer creation was successful // (checked in X11ComponentPeer.flip(), etc.) return 1; }
Example 2
Source File: X11GraphicsConfig.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create an XDBE-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * handle to the native backbuffer is returned. */ public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (!X11GraphicsDevice.isDBESupported()) { throw new AWTException("Page flipping is not supported"); } if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } long window = peer.getContentWindow(); int swapAction = getSwapAction(caps.getFlipContents()); return createBackBuffer(window, swapAction); }
Example 3
Source File: WGLGraphicsConfig.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Checks that the requested configuration is natively supported; if not, * an AWTException is thrown. */ @Override public void assertOperationSupported(Component target, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 4
Source File: WGLGraphicsConfig.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Checks that the requested configuration is natively supported; if not, * an AWTException is thrown. */ @Override public void assertOperationSupported(Component target, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 5
Source File: CGLGraphicsConfig.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
@Override public void assertOperationSupported(final int numBuffers, final BufferCapabilities caps) throws AWTException { // Assume this method is never called with numBuffers != 2, as 0 is // unsupported, and 1 corresponds to a SingleBufferStrategy which // doesn't depend on the peer. Screen is considered as a separate // "buffer". if (numBuffers != 2) { throw new AWTException("Only double buffering is supported"); } final BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 6
Source File: X11GraphicsConfig.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create an XDBE-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * handle to the native backbuffer is returned. */ public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (!X11GraphicsDevice.isDBESupported()) { throw new AWTException("Page flipping is not supported"); } if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } long window = peer.getContentWindow(); int swapAction = getSwapAction(caps.getFlipContents()); return createBackBuffer(window, swapAction); }
Example 7
Source File: GLXGraphicsConfig.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create a GLX-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * value of 1 is returned. */ @Override public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } // non-zero return value means backbuffer creation was successful // (checked in X11ComponentPeer.flip(), etc.) return 1; }
Example 8
Source File: CGLGraphicsConfig.java From hottub with GNU General Public License v2.0 | 6 votes |
@Override public void assertOperationSupported(final int numBuffers, final BufferCapabilities caps) throws AWTException { // Assume this method is never called with numBuffers != 2, as 0 is // unsupported, and 1 corresponds to a SingleBufferStrategy which // doesn't depend on the peer. Screen is considered as a separate // "buffer". if (numBuffers != 2) { throw new AWTException("Only double buffering is supported"); } final BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 9
Source File: GLXGraphicsConfig.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create a GLX-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * value of 1 is returned. */ @Override public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } // non-zero return value means backbuffer creation was successful // (checked in X11ComponentPeer.flip(), etc.) return 1; }
Example 10
Source File: CGLGraphicsConfig.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
@Override public void assertOperationSupported(final int numBuffers, final BufferCapabilities caps) throws AWTException { // Assume this method is never called with numBuffers != 2, as 0 is // unsupported, and 1 corresponds to a SingleBufferStrategy which // doesn't depend on the peer. Screen is considered as a separate // "buffer". if (numBuffers != 2) { throw new AWTException("Only double buffering is supported"); } final BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 11
Source File: CGLGraphicsConfig.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
@Override public void assertOperationSupported(final int numBuffers, final BufferCapabilities caps) throws AWTException { // Assume this method is never called with numBuffers != 2, as 0 is // unsupported, and 1 corresponds to a SingleBufferStrategy which // doesn't depend on the peer. Screen is considered as a separate // "buffer". if (numBuffers != 2) { throw new AWTException("Only double buffering is supported"); } final BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 12
Source File: WGLGraphicsConfig.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Checks that the requested configuration is natively supported; if not, * an AWTException is thrown. */ @Override public void assertOperationSupported(Component target, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 13
Source File: X11GraphicsConfig.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create an XDBE-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * handle to the native backbuffer is returned. */ public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (!X11GraphicsDevice.isDBESupported()) { throw new AWTException("Page flipping is not supported"); } if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } long window = peer.getContentWindow(); int swapAction = getSwapAction(caps.getFlipContents()); return createBackBuffer(window, swapAction); }
Example 14
Source File: CGLGraphicsConfig.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
@Override public void assertOperationSupported(final int numBuffers, final BufferCapabilities caps) throws AWTException { // Assume this method is never called with numBuffers != 2, as 0 is // unsupported, and 1 corresponds to a SingleBufferStrategy which // doesn't depend on the peer. Screen is considered as a separate // "buffer". if (numBuffers != 2) { throw new AWTException("Only double buffering is supported"); } final BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 15
Source File: WGLGraphicsConfig.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Checks that the requested configuration is natively supported; if not, * an AWTException is thrown. */ @Override public void assertOperationSupported(Component target, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 16
Source File: X11GraphicsConfig.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create an XDBE-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * handle to the native backbuffer is returned. */ public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (!X11GraphicsDevice.isDBESupported()) { throw new AWTException("Page flipping is not supported"); } if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } long window = peer.getContentWindow(); int swapAction = getSwapAction(caps.getFlipContents()); return createBackBuffer(window, swapAction); }
Example 17
Source File: CGLGraphicsConfig.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
@Override public void assertOperationSupported(final int numBuffers, final BufferCapabilities caps) throws AWTException { // Assume this method is never called with numBuffers != 2, as 0 is // unsupported, and 1 corresponds to a SingleBufferStrategy which // doesn't depend on the peer. Screen is considered as a separate // "buffer". if (numBuffers != 2) { throw new AWTException("Only double buffering is supported"); } final BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 18
Source File: X11GraphicsConfig.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create an XDBE-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * handle to the native backbuffer is returned. */ public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (!X11GraphicsDevice.isDBESupported()) { throw new AWTException("Page flipping is not supported"); } if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } long window = peer.getContentWindow(); int swapAction = getSwapAction(caps.getFlipContents()); return createBackBuffer(window, swapAction); }
Example 19
Source File: CGLGraphicsConfig.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override public void assertOperationSupported(final int numBuffers, final BufferCapabilities caps) throws AWTException { // Assume this method is never called with numBuffers != 2, as 0 is // unsupported, and 1 corresponds to a SingleBufferStrategy which // doesn't depend on the peer. Screen is considered as a separate // "buffer". if (numBuffers != 2) { throw new AWTException("Only double buffering is supported"); } final BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } }
Example 20
Source File: GLXGraphicsConfig.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Attempts to create a GLX-based backbuffer for the given peer. If * the requested configuration is not natively supported, an AWTException * is thrown. Otherwise, if the backbuffer creation is successful, a * value of 1 is returned. */ @Override public long createBackBuffer(X11ComponentPeer peer, int numBuffers, BufferCapabilities caps) throws AWTException { if (numBuffers > 2) { throw new AWTException( "Only double or single buffering is supported"); } BufferCapabilities configCaps = getBufferCapabilities(); if (!configCaps.isPageFlipping()) { throw new AWTException("Page flipping is not supported"); } if (caps.getFlipContents() == BufferCapabilities.FlipContents.PRIOR) { throw new AWTException("FlipContents.PRIOR is not supported"); } // non-zero return value means backbuffer creation was successful // (checked in X11ComponentPeer.flip(), etc.) return 1; }