JDK-4379980 : VolatileImage needs better support for multimon
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2000-10-17
  • Updated: 2000-10-20
  • Resolved: 2000-10-20
Related Reports
Duplicate :  
Description
VolatileImage currently has no means to help the user support multi-
monitor situations.  The problem is that VolatileImage objects are inherently
tied to the device on which they were created (e.g., the video card of
a particular display on Windows).  When an app asks the VolatileImage to 
copy its contents to a different device (for example, if the app window
moved to a different monitor or the app attempts to use one back buffer
for several windows), this operation could fail but there is no way for
VolatileImage to tell the user why it failed or what to do about it.

Comments
EVALUATION Currently, the validate() method of VolatileImage takes no arguments and is responsible purely for restoring or recreating the image surface, if it is in a lost state. We should enhance the validate() method to take a GraphicsConfiguration object as an input parameter. The method could then check whether the current VolatileImage object is compatible with this GC. If so, it restores the surface as before and returns a message to the app telling whether the image was ok or restored. If not, it returns a message to the user that the image is incompatible with the given GC; at this point the user app can decide what to do about the situation (presumably use some other VolatileImage object or create a new one for this purpose). This approach would allow us to tell the user about failures before they happen and to inform them with e3nough details that they can hopefully correct the problem and then try again.
11-06-2004