Class Overview
This SurfaceManager variant manages an unaccelerated volatile surface.
This class is created in the event that someone requested a VolatileImage
to be created from a BufferedImageGraphicsConfig, which is not platform-
or hardware-based, thus the resulting surface and surface manager
are unaccelerated. All we do in this class is implement the abstract
methods of VolatileSurfaceManager to return values that indicate that
we cannot accelerate surfaces through this SurfaceManager, thus the
parent class will handle things through the unaccelerated backup mechanism.
Summary
[Expand]
Inherited Methods |
From class
sun.awt.image.VolatileSurfaceManager
void
|
acceleratedSurfaceLost()
If the accelerated surface is the current SurfaceData for this manager,
sets the variable lostSurface to true, which indicates that something
happened to the image under management.
|
boolean
|
contentsLost()
Returns true if rendering data was lost since the last validate call.
|
void
|
displayChanged()
Called from SunGraphicsEnv when there has been a display mode change.
|
void
|
flush()
Releases any associated hardware memory for this image by
calling flush on sdAccel.
|
SurfaceData
|
getBackupSurface()
Creates a software-based surface (of type BufImgSurfaceData).
|
ImageCapabilities
|
getCapabilities(GraphicsConfiguration gc)
Returns an ImageCapabilities object which can be
inquired as to the specific capabilities of this
Image.
|
SurfaceData
|
getPrimarySurfaceData()
Returns the main SurfaceData object that "owns" the pixels for
this SurfaceManager.
|
abstract
SurfaceData
|
initAcceleratedSurface()
Creates a new accelerated surface that is compatible with the
current GraphicsConfiguration.
|
void
|
initContents()
Set contents of the current SurfaceData to default state (i.e.
|
void
|
initialize()
This init function is separate from the constructor because the
things we are doing here necessitate the object's existence.
|
abstract
boolean
|
isAccelerationEnabled()
Returns true if acceleration is enabled.
|
boolean
|
isConfigValid(GraphicsConfiguration gc)
Called by validate() to see whether the GC passed in is ok for
rendering to.
|
void
|
paletteChanged()
When device palette changes, need to force a new copy
of the image into our hardware cache to update the
color indices of the pixels (indexed mode only).
|
void
|
restoreAcceleratedSurface()
Restore sdAccel in case it was lost.
|
SurfaceData
|
restoreContents()
Called from a SurfaceData object, indicating that our
accelerated surface has been lost and should be restored (perhaps
using a backup system memory surface).
|
int
|
validate(GraphicsConfiguration gc)
Get the image ready for rendering.
|
|
From class
sun.awt.image.SurfaceManager
|
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
final
void
|
wait(long timeout, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long timeout)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
|
From interface
sun.awt.DisplayChangedListener
abstract
void
|
displayChanged()
Invoked when the display mode has changed.
|
abstract
void
|
paletteChanged()
Invoked when the palette has changed.
|
|
Public Constructors
public
BufImgVolatileSurfaceManager
(SunVolatileImage vImg, Object context)
This constructor simply defers to the superclass since all of the real
functionality of this class is implemented in VolatileSurfaceManager.
Protected Methods
protected
SurfaceData
initAcceleratedSurface
()
Returns null to indicate failure in creating the accelerated surface.
Note that this method should not ever be called since creation of
accelerated surfaces should be preceded by calls to the above
isAccelerationEnabled() method. But we need to override this method
since it is abstract in our parent class.
protected
boolean
isAccelerationEnabled
()
Returns false to indicate that this surface manager cannot accelerate
the image.