APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.java2d.opengl

public Class OGLRenderQueue

extends RenderQueue
Class Inheritance
Imports
sun.awt.util.ThreadGroupUtils, sun.java2d.pipe.RenderBuffer, .RenderQueue

OGL-specific implementation of RenderQueue. This class provides a single (daemon) thread that is responsible for periodically flushing the queue, thus ensuring that only one thread communicates with the native OpenGL libraries for the entire process.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final OGLRenderQueue.QueueFlusher
private static OGLRenderQueue
Inherited from sun.java2d.pipe.RenderQueue:
bufrefSet

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
disposeGraphicsConfig(long pConfigInfo)

Disposes the native memory associated with the given native graphics config info pointer on the single queue flushing thread.

public void
flushAndInvokeNow(Runnable r)

Implements abstract sun.java2d.pipe.RenderQueue.flushAndInvokeNow.

Immediately processes each operation currently pending on the buffer, and then invokes the provided task.

private native void
flushBuffer(long buf, int limit)

private void
public void
flushNow()

Implements abstract sun.java2d.pipe.RenderQueue.flushNow.

Immediately processes each operation currently pending on the buffer.

public static synchronized OGLRenderQueue
getInstance()

Returns the single OGLRenderQueue instance.

public static boolean
isQueueFlusherThread()

Returns true if the current thread is the OGL QueueFlusher thread.

public static void
sync()

Flushes the single OGLRenderQueue instance synchronously.

Inherited from sun.java2d.pipe.RenderQueue:
addReferenceensureAlignmentensureCapacityensureCapacityAndAlignmentflushNowgetBufferlocktryLockunlock

Field Detail

flusherback to summary
private final OGLRenderQueue.QueueFlusher flusher
theInstanceback to summary
private static OGLRenderQueue theInstance

Constructor Detail

OGLRenderQueueback to summary
private OGLRenderQueue()

Method Detail

disposeGraphicsConfigback to summary
public static void disposeGraphicsConfig(long pConfigInfo)

Disposes the native memory associated with the given native graphics config info pointer on the single queue flushing thread.

flushAndInvokeNowback to summary
public void flushAndInvokeNow(Runnable r)

Implements abstract sun.java2d.pipe.RenderQueue.flushAndInvokeNow.

Doc from sun.java2d.pipe.RenderQueue.flushAndInvokeNow.

Immediately processes each operation currently pending on the buffer, and then invokes the provided task. This method will block until the entire buffer has been flushed and the provided task has been executed. The queue lock must be acquired before calling this method.

flushBufferback to summary
private native void flushBuffer(long buf, int limit)
flushBufferback to summary
private void flushBuffer()
flushNowback to summary
public void flushNow()

Implements abstract sun.java2d.pipe.RenderQueue.flushNow.

Doc from sun.java2d.pipe.RenderQueue.flushNow.

Immediately processes each operation currently pending on the buffer. This method will block until the entire buffer has been flushed. The queue lock must be acquired before calling this method.

getInstanceback to summary
public static synchronized OGLRenderQueue getInstance()

Returns the single OGLRenderQueue instance. If it has not yet been initialized, this method will first construct the single instance before returning it.

isQueueFlusherThreadback to summary
public static boolean isQueueFlusherThread()

Returns true if the current thread is the OGL QueueFlusher thread.

syncback to summary
public static void sync()

Flushes the single OGLRenderQueue instance synchronously. If an OGLRenderQueue has not yet been instantiated, this method is a no-op. This method is useful in the case of Toolkit.sync(), in which we want to flush the OGL pipeline, but only if the OGL pipeline is currently enabled. Since this class has few external dependencies, callers need not be concerned that calling this method will trigger initialization of the OGL pipeline and related classes.

sun.java2d.opengl back to summary

private Class OGLRenderQueue.QueueFlusher

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
private Error
private boolean
private Runnable
private final Thread

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
public synchronized void
public synchronized void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

errorback to summary
private Error error
needsFlushback to summary
private boolean needsFlush
taskback to summary
private Runnable task
threadback to summary
private final Thread thread

Constructor Detail

QueueFlusherback to summary
public QueueFlusher()

Method Detail

flushAndInvokeNowback to summary
public synchronized void flushAndInvokeNow(Runnable task)
flushNowback to summary
public synchronized void flushNow()
runback to summary
public synchronized void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.