Top Description Fields Constructors Methods
sun.java2d.x11

public Class X11VolatileSurfaceManager

extends VolatileSurfaceManager
Class Inheritance
Imports
java.awt.GraphicsConfiguration, .ImageCapabilities, .Transparency, java.awt.image.ColorModel, sun.awt.X11GraphicsConfig, sun.awt.image.SunVolatileImage, .VolatileSurfaceManager, sun.java2d.SurfaceData

X11 platform implementation of the VolatileSurfaceManager class. The class attempts to create and use a pixmap-based SurfaceData object (X11PixmapSurfaceData). If this object cannot be created or re-created as necessary, the class falls back to a system memory based SurfaceData object (BufImgSurfaceData) that will be used until the accelerated SurfaceData can be restored.

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from sun.awt.image.VolatileSurfaceManager:
atCurrentcontextlostSurfacesdAccelsdBackupsdCurrentsdPreviousvImg

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ImageCapabilities
getCapabilities(GraphicsConfiguration gc)

Overrides sun.awt.image.VolatileSurfaceManager.getCapabilities.

Need to override the default behavior because Pixmaps-based images are accelerated but not volatile.
protected SurfaceData
initAcceleratedSurface()

Implements abstract sun.awt.image.VolatileSurfaceManager.initAcceleratedSurface.

Create a pixmap-based SurfaceData object
protected boolean
isAccelerationEnabled()

Implements abstract sun.awt.image.VolatileSurfaceManager.isAccelerationEnabled.

Returns true if acceleration is enabled.
protected boolean
isConfigValid(GraphicsConfiguration gc)

Overrides sun.awt.image.VolatileSurfaceManager.isConfigValid.

Called by validate() to see whether the GC passed in is ok for rendering to.
Inherited from sun.awt.image.VolatileSurfaceManager:
acceleratedSurfaceLostcontentsLostdisplayChangedflushgetBackupSurfacegetPrimarySurfaceDatainitContentsinitializepaletteChangedrestoreAcceleratedSurfacerestoreContentsvalidate

Field Detail

accelerationEnabledback to summary
private boolean accelerationEnabled

Constructor Detail

X11VolatileSurfaceManagerback to summary
public X11VolatileSurfaceManager(SunVolatileImage vImg, Object context)

Method Detail

getCapabilitiesback to summary
public ImageCapabilities getCapabilities(GraphicsConfiguration gc)

Overrides sun.awt.image.VolatileSurfaceManager.getCapabilities.

Need to override the default behavior because Pixmaps-based images are accelerated but not volatile.

Annotations
@Override
initAcceleratedSurfaceback to summary
protected SurfaceData initAcceleratedSurface()

Implements abstract sun.awt.image.VolatileSurfaceManager.initAcceleratedSurface.

Create a pixmap-based SurfaceData object

isAccelerationEnabledback to summary
protected boolean isAccelerationEnabled()

Implements abstract sun.awt.image.VolatileSurfaceManager.isAccelerationEnabled.

Doc from sun.awt.image.VolatileSurfaceManager.isAccelerationEnabled.

Returns true if acceleration is enabled. If not, we simply use the backup SurfaceData object and return quickly from most methods in this class.

isConfigValidback to summary
protected boolean isConfigValid(GraphicsConfiguration gc)

Overrides sun.awt.image.VolatileSurfaceManager.isConfigValid.

Doc from sun.awt.image.VolatileSurfaceManager.isConfigValid.

Called by validate() to see whether the GC passed in is ok for rendering to. This generic implementation checks to see whether the GC is either null or is from the same device as the one that this image was created on. Platform- specific implementations may perform other checks as appropriate.