Class Overview
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.
Summary
Public Methods |
static
void
|
disposeGraphicsConfig(long pConfigInfo)
Disposes the native memory associated with the given native
graphics config info pointer on the single queue flushing thread.
|
void
|
flushAndInvokeNow(Runnable r)
Immediately processes each operation currently pending on the buffer,
and then invokes the provided task.
|
void
|
flushNow()
Immediately processes each operation currently pending on the buffer.
|
synchronized
static
OGLRenderQueue
|
getInstance()
Returns the single OGLRenderQueue instance.
|
static
boolean
|
isQueueFlusherThread()
Returns true if the current thread is the OGL QueueFlusher thread.
|
static
void
|
sync()
Flushes the single OGLRenderQueue instance synchronously.
|
[Expand]
Inherited Methods |
From class
sun.java2d.pipe.RenderQueue
final
void
|
addReference(Object ref)
Adds the given Object to the set of hard references, which will
prevent that Object from being disposed until the queue has been
flushed completely.
|
final
void
|
ensureAlignment(int first8ByteValueOffset)
Inserts a 4-byte NOOP token when necessary to ensure that all 8-byte
parameters for the following operation are added to the underlying
buffer with an 8-byte memory alignment.
|
final
void
|
ensureCapacity(int opsize)
Ensures that there will be enough room on the underlying buffer
for the following operation.
|
final
void
|
ensureCapacityAndAlignment(int opsize, int first8ByteValueOffset)
Convenience method that is equivalent to calling ensureCapacity()
followed by ensureAlignment().
|
abstract
void
|
flushAndInvokeNow(Runnable task)
Immediately processes each operation currently pending on the buffer,
and then invokes the provided task.
|
void
|
flushNow(int position)
Updates the current position of the underlying buffer, and then
flushes the queue immediately.
|
abstract
void
|
flushNow()
Immediately processes each operation currently pending on the buffer.
|
final
RenderBuffer
|
getBuffer()
Returns the encapsulated RenderBuffer object.
|
final
void
|
lock()
Locks the queue for read/write access.
|
final
boolean
|
tryLock()
Attempts to lock the queue.
|
final
void
|
unlock()
Unlocks the queue.
|
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
Public Methods
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)
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.
public
void
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.
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.
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. 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.