EVALUATION
Name: ssR10077 Date: 01/19/2004
###@###.### 2004-01-19
Looks like it's related to 4919042.
======================================================================
I checked that the fix for 4919042 doesn't fix this bug. Swing team requires this to be fixed to resolve gray-box problem, we must fix this ASAP.
###@###.### 10/5/04 11:36 GMT
It appears that the fix for 4919042 did resolve the resize event problems
that I had originally reported with this bug report. However, the other
2D-specific changes (detecting when the backbuffer needs to be recreated)
still need to be made. As mentioned above, this needs to be fixed soon
because the gray rect fix depends on this functionality, so that resizing
windows using BufferStrategy works properly.
Fortunately, the changes are localized to Component.java in the FlipBS
and BltBS implementations. In the FlipBS case, we were not detecting the
case where the window has been resized (BltBS already handled this case
properly). The fix here is to add checks in FlipBS.revalidate() (similar
to BltBS.revalidate()) so that we recreate the backbuffer(s) when the
window has been resized.
I'm taking this opportunity to clean up a few other minor problems with the
BufferStrategy implementations. For example, validatedContents was never
reset if it was ever set to true (such as when the underlying VolatileImage
has been restored), and so contentsRestored() would always return true. The
fix here is to clear the validatedContents flag at the beginning of
revalidate().
Another problem: in BltBS when the backbuffers are re-created (e.g. after
the component has been resized), we did not first explicitly call flush()
on any existing backbuffers. Now that we are calling flush() before
recreating the backbuffers, we are more likely to have VRAM available for
the newly created surfaces.
Another problem: in both FlipBS and BltBS we had never properly checked
for IMAGE_INCOMPATIBLE in revalidate(). Now we do check for this value,
and if it is returned from validate() we will recreate the backbuffers and
set the validatedContents flag.
With these fixes in place, the attached testcase can be resized (with the
correct results) on Windows (with and without OGL) and on Solaris/Linux
(with and without OGL). I'm reassigning this bug to myself, since AWT is
no longer responsible for these fixes.
###@###.### 2005-1-29 01:24:16 GMT
|