United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6691181 SunToolkit.disableBackgroundErase() needs to support more components
JDK-6691181 : SunToolkit.disableBackgroundErase() needs to support more components

Details
Type:
Bug
Submit Date:
2008-04-19
Status:
Resolved
Updated Date:
2008-04-29
Project Name:
JDK
Resolved Date:
2008-04-29
Component:
client-libs
OS:
generic
Sub-Component:
java.awt
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b23)

Related Reports
Backport:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
Investigation has revealed that the root cause of certain flickering with applets (for example, during some applet resizes, and when resizing the "gray box painter" responsible for painting a custom image or the Java logo during applet loading) is due to the AWT's native background erasure.

The SunToolkit.disableBackgroundErase(Canvas) method added for 6333613 needs to have an overloaded variant added, SunToolkit.disableBackgroundErase(Component), which should take effect for any applicable component and ignore others. Currently this seems to mean any component with a WCanvasPeer or XCanvasPeer, which includes the EmbeddedFrame subclasses.

                                    

Comments
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/deployment_data/6u10/6691181.0
                                     
2008-04-20
EVALUATION

During investigation of Java Plug-In bug 6691182 (Flickering of gray
box painter during applet resizes), it was discovered that the root
cause was the native background repainting of the Canvas and other AWT
components using the WCanvasPeer or XCanvasPeer.

For this reason, it is necessary to generalize the Sun-private
mechanisms added in 6333613 and 6558510 to work with more types of
Components (in particular, Canvas, Panel and Window).

An overloaded variant of SunToolkit.disableBackgroundErase() taking a
Component rather than a Canvas as argument has been added. The
implementation has been restructured to work on both the Windows and
X11 platforms. On X11 platforms, the disabling of the background erase
had to be supported earlier, because if it was a requirement that the
peer had to be created, then it would be too late, because once
XSetBackground is called during peer creation, the flickering will be
apparent.

There is no test case for this specific bug due to the difficulty of
writing a standalone test case. A test case will be provided for the
related bug 6691182. The changes have been verified on the Windows and
Solaris platforms with the test case for 6691182.
                                     
2008-04-20



Hardware and Software, Engineered to Work Together