Bug 1182

Summary: AWT Toolkit disableBackgroundErase() ineffective since Java 7, flickering visible at resize of GLCanvas
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: awtAssignee: Sven Gothel <sgothel>
Status: RESOLVED INVALID    
Severity: normal    
Priority: P3    
Version: 2.3.2   
Hardware: All   
OS: linux   
Type: DEFECT SCM Refs:
Workaround: TRUE

Description Sven Gothel 2015-07-27 01:59:38 CEST
Platform: GNU/Linux X11
Java >= 7

- Visible while resizing GLCanvas on GNU/Linux X11 w/ Java >= 7

- Method 'disableBackgroundErase()' has been successfully queried
  from Toolkit implementation and called from within GLCanvas.
  However, flickering is visible - On Java 6 no flickering is observed.

- Determine whether other platforms are affected as well.
Comment 1 Sven Gothel 2015-07-28 01:28:53 CEST
Manual resize worked well in Java 6.

+++

Seems like that the Container holding the GLCanvas (etc)
are not fully covered by the GLCanvas at manual resize
due to deferred resizing on the platform?

In such case, the inner GLCanvas does not
completely cover its container [clipping] space
and 'Container.update(Graphics)' performs
a Graphics.clearRect(..).

A tedious workaround would be to override all 
'Container.update(Graphics)' methods
to skip the clearRect call (similar to GLCanvas).

Further there is the 'infamous' system property:
  sun.awt.noerasebackground=true

Also see: <https://stackoverflow.com/questions/5452439/awt-canvas-flickering-on-manual-resize>

Nothing we can do here, I am afraid.

INVALID: b/c this doesn't seem to be our bug.

If anybody has a proper workaround/solution,
please reopen this bug so we can adopt the patch.