java.lang.Objectsun.awt.image.SurfaceManager
Direct Known Subclasses:
BufImgSurfaceManager, WinBackBufferSurfaceManager, X11VolatileSurfaceManager, WinVolatileSurfaceManager, VolatileSurfaceManager, BufImgVolatileSurfaceManager, GLXVolatileSurfaceManager, WGLVolatileSurfaceManager
The SurfaceManager also maintains an arbitrary "cache" mechanism which allows other agents to store data in it specific to their use of this image. The most common use of the caching mechanism is for destination SurfaceData objects to store cached copies of the source image.
| Nested Class Summary: | ||
|---|---|---|
| abstract public static class | SurfaceManager.ImageAccessor | |
| class | SurfaceManager.ImageCapabilitiesGc | |
| public static interface | SurfaceManager.ProxiedGraphicsConfig | An interface for GraphicsConfiguration objects to implement if their surfaces accelerate images using SurfaceDataProxy objects. Implementing this interface facilitates the default implementation of getImageCapabilities() above. |
| public static interface | SurfaceManager.FlushableCacheData | An interface for Objects used in the SurfaceManager cache to implement if they have data that should be flushed when the Image is flushed. |
| Method from sun.awt.image.SurfaceManager Summary: |
|---|
| acceleratedSurfaceLost, flush, flush, getCacheData, getCapabilities, getManager, getPrimarySurfaceData, restoreContents, setAccelerationPriority, setCacheData, setImageAccessor, setManager |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from sun.awt.image.SurfaceManager Detail: |
|---|
|
The default implementation will visit all of the value objects in the cacheMap and flush them if they implement the FlushableCacheData interface. |
|
Note that the cache is maintained as a simple Map with no attempts to keep it up to date or invalidate it so any data stored here must either not be dependent on the state of the image or it must be individually tracked to see if it is outdated or obsolete. The SurfaceData object of the primary (destination) surface has a StateTracker mechanism which can help track the validity and "currentness" of any data stored here. For convenience and expediency an object stored as cached data may implement the FlushableCacheData interface specified below so that it may be notified immediately if the flush() method is ever called. |
This class provides a default implementation of the ImageCapabilities that will try to determine if there is an associated SurfaceDataProxy object and if it is up to date, but only works for GraphicsConfiguration objects which implement the ProxiedGraphicsConfig interface defined below. In practice, all configs which can be accelerated are currently implementing that interface. A null GraphicsConfiguration returns a value based on whether the image is currently accelerated on its default GraphicsConfiguration. |
|
|
|
The default implementation will visit all of the value objects in the cacheMap when the priority gets set to 0.0 and flush them if they implement the FlushableCacheData interface. |
|
|
|