APIdia Launch Partner
Top Description Methods
com.sun.prism

public Interface PixelSource

Known Direct Implementers
com.sun.prism.impl.QueuedPixelSource
Imports
com.sun.glass.ui.Pixels

An interface to facilitate the asynchronous delivery of frames of pixels between threads with support for an arbitrary number of outstanding delivery requests.

Method Summary

Modifier and TypeMethod and Description
public void
doneWithPixels(Pixels
a non-null Pixels object previously obtained from getLatestPixels()
used
)

Indicates that the specified non-null Pixels object which was obtained from getLatestPixels() is done being processed and can be reused for future pixel deliveries if needed.

public Pixels

Returns:

the next Pixels object to process, or null if there is nothing to process
getLatestPixels
()

Gets the next "latest" set of Pixels to be processed or displayed.

public void
skipLatestPixels()

A one step method for skipping a pixel delivery object in the case where the consumer is not ready to process any pixels.

Method Detail

doneWithPixelsback to summary
public void doneWithPixels(Pixels used)

Indicates that the specified non-null Pixels object which was obtained from getLatestPixels() is done being processed and can be reused for future pixel deliveries if needed. This method should be called by the consumer if and only if the call to getLatestPixels() returned a non-null object.

Parameters
used:Pixels

a non-null Pixels object previously obtained from getLatestPixels()

getLatestPixelsback to summary
public Pixels getLatestPixels()

Gets the next "latest" set of Pixels to be processed or displayed. This method is called by the consumer of Pixels objects. The return value may be null if the delivery request was obsoleted or superceded while in transit between the threads. The caller should call doneWithPixels() if and only if the return value was non-null.

Returns:Pixels

the next Pixels object to process, or null if there is nothing to process

skipLatestPixelsback to summary
public void skipLatestPixels()

A one step method for skipping a pixel delivery object in the case where the consumer is not ready to process any pixels. Examples of cases where this method is used is when deliveries are received for closed, iconified, or disposed windows. This call is equivalent to doneWithPixels(getLatestPixels()).