public class

OGLRenderQueue

extends RenderQueue
java.lang.Object
   ↳ sun.java2d.pipe.RenderQueue
     ↳ sun.java2d.opengl.OGLRenderQueue

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

[Expand]
Inherited Fields
From class sun.java2d.pipe.RenderQueue
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
From class java.lang.Object

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.