sun.java2d.pipe.RenderBuffer Java Examples
The following examples show how to use
sun.java2d.pipe.RenderBuffer.
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: D3DRenderQueue.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native memory associated with the given native * graphics config info pointer on the single queue flushing thread. */ public static void disposeGraphicsConfig(long pConfigInfo) { D3DRenderQueue rq = getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_CONFIG); buf.putLong(pConfigInfo); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #2
Source File: D3DSurfaceData.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native resources associated with the given D3DSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level D3DSurfaceData object is about to go away. */ static void dispose(long pData) { D3DRenderQueue rq = D3DRenderQueue.getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #3
Source File: OGLBlitLoops.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #4
Source File: OGLSurfaceData.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native resources associated with the given OGLSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level OGLSurfaceData object is about to go away. Note that we * also pass a reference to the native GLX/WGLGraphicsConfigInfo * (pConfigInfo) for the purposes of making a context current. */ static void dispose(long pData, long pConfigInfo) { OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { // make sure we have a current context before // disposing the native resources (e.g. texture object) OGLContext.setScratchSurface(pConfigInfo); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #5
Source File: D3DBlitLoops.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #6
Source File: OGLRenderQueue.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native memory associated with the given native * graphics config info pointer on the single queue flushing thread. */ public static void disposeGraphicsConfig(long pConfigInfo) { OGLRenderQueue rq = getInstance(); rq.lock(); try { // make sure we make the context associated with the given // GraphicsConfig current before disposing the native resources OGLContext.setScratchSurface(pConfigInfo); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_CONFIG); buf.putLong(pConfigInfo); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #7
Source File: D3DBlitLoops.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #8
Source File: OGLSurfaceData.java From Bytecoder with Apache License 2.0 | 6 votes |
public void flush() { invalidate(); OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { // make sure we have a current context before // disposing the native resources (e.g. texture object) OGLContext.setScratchSurface(graphicsConfig); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(FLUSH_SURFACE); buf.putLong(getNativeOps()); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #9
Source File: OGLSurfaceData.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Disposes the native resources associated with the given OGLSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level OGLSurfaceData object is about to go away. Note that we * also pass a reference to the OGLGraphicsConfig * for the purposes of making a context current. */ static void dispose(long pData, OGLGraphicsConfig gc) { OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { // make sure we have a current context before // disposing the native resources (e.g. texture object) OGLContext.setScratchSurface(gc); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #10
Source File: OGLBlitLoops.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #11
Source File: OGLRenderQueue.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Disposes the native memory associated with the given native * graphics config info pointer on the single queue flushing thread. */ public static void disposeGraphicsConfig(long pConfigInfo) { OGLRenderQueue rq = getInstance(); rq.lock(); try { // make sure we make the context associated with the given // GraphicsConfig current before disposing the native resources OGLContext.setScratchSurface(pConfigInfo); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_CONFIG); buf.putLong(pConfigInfo); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #12
Source File: OGLSurfaceData.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void flush() { invalidate(); OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { // make sure we have a current context before // disposing the native resources (e.g. texture object) OGLContext.setScratchSurface(graphicsConfig); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(FLUSH_SURFACE); buf.putLong(getNativeOps()); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #13
Source File: OGLSurfaceData.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native resources associated with the given OGLSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level OGLSurfaceData object is about to go away. Note that we * also pass a reference to the native GLX/WGLGraphicsConfigInfo * (pConfigInfo) for the purposes of making a context current. */ static void dispose(long pData, long pConfigInfo) { OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { // make sure we have a current context before // disposing the native resources (e.g. texture object) OGLContext.setScratchSurface(pConfigInfo); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #14
Source File: D3DContext.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Sets the current context on the native level to be the one passed as * the argument. * If the context is not the same as the defaultContext the latter * will be reset to null. * * This call is needed when copying from a SW surface to a Texture * (the upload test) or copying from d3d to SW surface to make sure we * have the correct current context. * * @param d3dc the context to be made current on the native level */ static void setScratchSurface(D3DContext d3dc) { // assert D3DRenderQueue.getInstance().lock.isHeldByCurrentThread(); // invalidate the current context if (d3dc != currentContext) { currentContext = null; } // set the scratch context D3DRenderQueue rq = D3DRenderQueue.getInstance(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacity(8); buf.putInt(SET_SCRATCH_SURFACE); buf.putInt(d3dc.getDevice().getScreen()); }
Example #15
Source File: D3DContext.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Sets the current context on the native level to be the one passed as * the argument. * If the context is not the same as the defaultContext the latter * will be reset to null. * * This call is needed when copying from a SW surface to a Texture * (the upload test) or copying from d3d to SW surface to make sure we * have the correct current context. * * @param d3dc the context to be made current on the native level */ static void setScratchSurface(D3DContext d3dc) { // assert D3DRenderQueue.getInstance().lock.isHeldByCurrentThread(); // invalidate the current context if (d3dc != currentContext) { currentContext = null; } // set the scratch context D3DRenderQueue rq = D3DRenderQueue.getInstance(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacity(8); buf.putInt(SET_SCRATCH_SURFACE); buf.putInt(d3dc.getDevice().getScreen()); }
Example #16
Source File: D3DBlitLoops.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #17
Source File: OGLBlitLoops.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #18
Source File: D3DSurfaceData.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native resources associated with the given D3DSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level D3DSurfaceData object is about to go away. */ static void dispose(long pData) { D3DRenderQueue rq = D3DRenderQueue.getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #19
Source File: D3DSurfaceData.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override public void flush() { D3DRenderQueue rq = D3DRenderQueue.getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(FLUSH_SURFACE); buf.putLong(getNativeOps()); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #20
Source File: OGLRenderQueue.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native memory associated with the given native * graphics config info pointer on the single queue flushing thread. */ public static void disposeGraphicsConfig(long pConfigInfo) { OGLRenderQueue rq = getInstance(); rq.lock(); try { // make sure we make the context associated with the given // GraphicsConfig current before disposing the native resources OGLContext.setScratchSurface(pConfigInfo); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_CONFIG); buf.putLong(pConfigInfo); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #21
Source File: OGLBlitLoops.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #22
Source File: D3DBlitLoops.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #23
Source File: OGLSurfaceData.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native resources associated with the given OGLSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level OGLSurfaceData object is about to go away. Note that we * also pass a reference to the OGLGraphicsConfig * for the purposes of making a context current. */ static void dispose(long pData, OGLGraphicsConfig gc) { OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { // make sure we have a current context before // disposing the native resources (e.g. texture object) OGLContext.setScratchSurface(gc); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #24
Source File: OGLSurfaceData.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public void flush() { invalidate(); OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { // make sure we have a current context before // disposing the native resources (e.g. texture object) OGLContext.setScratchSurface(graphicsConfig); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(FLUSH_SURFACE); buf.putLong(getNativeOps()); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #25
Source File: D3DBlitLoops.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Enqueues a BLIT operation with the given parameters. Note that the * RenderQueue lock must be held before calling this method. */ private static void enqueueBlit(RenderQueue rq, SurfaceData src, SurfaceData dst, int packedParams, int sx1, int sy1, int sx2, int sy2, double dx1, double dy1, double dx2, double dy2) { // assert rq.lock.isHeldByCurrentThread(); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(72, 24); buf.putInt(BLIT); buf.putInt(packedParams); buf.putInt(sx1).putInt(sy1); buf.putInt(sx2).putInt(sy2); buf.putDouble(dx1).putDouble(dy1); buf.putDouble(dx2).putDouble(dy2); buf.putLong(src.getNativeOps()); buf.putLong(dst.getNativeOps()); }
Example #26
Source File: D3DRenderQueue.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native memory associated with the given native * graphics config info pointer on the single queue flushing thread. */ public static void disposeGraphicsConfig(long pConfigInfo) { D3DRenderQueue rq = getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_CONFIG); buf.putLong(pConfigInfo); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #27
Source File: D3DRenderQueue.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native memory associated with the given native * graphics config info pointer on the single queue flushing thread. */ public static void disposeGraphicsConfig(long pConfigInfo) { D3DRenderQueue rq = getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_CONFIG); buf.putLong(pConfigInfo); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #28
Source File: D3DSurfaceData.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native resources associated with the given D3DSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level D3DSurfaceData object is about to go away. */ static void dispose(long pData) { D3DRenderQueue rq = D3DRenderQueue.getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #29
Source File: D3DSurfaceData.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native resources associated with the given D3DSurfaceData * (referenced by the pData parameter). This method is invoked from * the native Dispose() method from the Disposer thread when the * Java-level D3DSurfaceData object is about to go away. */ static void dispose(long pData) { D3DRenderQueue rq = D3DRenderQueue.getInstance(); rq.lock(); try { RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_SURFACE); buf.putLong(pData); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }
Example #30
Source File: OGLRenderQueue.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Disposes the native memory associated with the given native * graphics config info pointer on the single queue flushing thread. */ public static void disposeGraphicsConfig(long pConfigInfo) { OGLRenderQueue rq = getInstance(); rq.lock(); try { // make sure we make the context associated with the given // GraphicsConfig current before disposing the native resources OGLContext.setScratchSurface(pConfigInfo); RenderBuffer buf = rq.getBuffer(); rq.ensureCapacityAndAlignment(12, 4); buf.putInt(DISPOSE_CONFIG); buf.putLong(pConfigInfo); // this call is expected to complete synchronously, so flush now rq.flushNow(); } finally { rq.unlock(); } }