public interface PixelSource
Modifier and Type | Method and Description |
---|---|
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. |
Pixels |
getLatestPixels()
Gets the next "latest" set of
Pixels to be processed or displayed. |
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.
|
Pixels getLatestPixels()
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.void doneWithPixels(Pixels used)
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.used
- a non-null Pixels
object previously obtained from
getLatestPixels()
void skipLatestPixels()
doneWithPixels(getLatestPixels())
.