[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-caciocavallo-dev
Subject:    [PATCH] The background should not be cleared on update events but on system triggered paint events
From:       roman () kennke ! org (Roman Kennke)
Date:       2009-06-15 23:21:56
Message-ID: 1245108116.4931.4.camel () saturn
[Download RAW message or body]

Hi Ingo,

I pushed the big repainting fix to the repo. I also integrated your
PlatformWindow fix, thanks. Regardings repainting here are the important
things that changed:

- In CacioContainerPeer we don't paint anything if we are in UPDATE
mode, Container.update() clears it anyway.
- Don't let user code draw into our insets (e.g. window decorations or
menus). This was a bit tricky to figure out, because user code can do
setClip(null) to unset any clip we set. The solution is
ConstrainableGraphics. Peer painting code uses a different Graphics
object for drawing now (one that is not constrained).
- The propagation of colors and fonts is slightly more efficient and
correct now.

This version now works ok for me for all the different apps that I have,
both 'standard UIs' as well as 'animated' stuff. Until now I could not
get both working at the same time, either the animation flickered or the
normal UIs had severe repainting artifacts.

Please try with your stuff and if you still have problems, ping me.

Thanks, Roman


Am Freitag, den 12.06.2009, 16:48 +0200 schrieb Ingo Proetel:
> # HG changeset patch
> # User Ingo Proetel <proetel at aicas.com>
> # Date 1244817881 -7200
> # Node ID 3adc0850deee8b16779b5940866c51d7a2354ef0
> # Parent  c2a4e0ecd46d06a22e22a318a200e914d3509d1e
> The background should not be cleared on update events but on system triggered paint events.
> 
> diff -r c2a4e0ecd46d -r 3adc0850deee src/share/classes/sun/awt/peer/cacio/CacioComponentPeer.java
> --- a/src/share/classes/sun/awt/peer/cacio/CacioComponentPeer.java	Fri Jun 12 16:44:21 2009 +0200
> +++ b/src/share/classes/sun/awt/peer/cacio/CacioComponentPeer.java	Fri Jun 12 16:44:41 2009 +0200
> @@ -297,7 +297,7 @@
>          case PaintEvent.UPDATE:
>              update = true;
>          case PaintEvent.PAINT:
> -            paintArea.paint(getAWTComponent(), update);
> +            paintArea.paint(getAWTComponent(), !update);
>            break;
>          case MouseEvent.MOUSE_PRESSED:
>          case MouseEvent.MOUSE_RELEASED:



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic