[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] RFC: Swing painting overhaul
From: |
Roman Kennke |
Subject: |
[cp-patches] RFC: Swing painting overhaul |
Date: |
Wed, 12 Oct 2005 22:15:46 +0200 |
Hi,
I finally got my improved (I hope) Swing painting to work. The situation
before was, that we always went up to the root window and painted
everything and let the clipping sort out what is not repainted.
This new painting is more finegrained. It makes use of the opaque and
isOptimizedPainting properties in JComponent, to sensibly find a paint
root that is:
- opaque
- not overlapped by another component
Also I changed addDirtyRegion, so it collapses overlapping dirty regions
into bigger chunks to avoid painting the same stuff more than once
within one work request.
I would like you to test this stuff. My hope is that painting is faster
for most cases, but since I haven't benchmarked this yet, I cannot
guarantee that. Also I want to avoid introducing any bugs with that, so
I won't blindly commit it before it's tested. Also, if you feel that it
makes performance worse, I will have to look into it a little deeper.
2005-10-12 Roman Kennke <address@hidden>
* javax/swing/JComponent.java
(paintImmediately): Find the paint root more cleverly, instead
of
going up to the root.
(findPaintRoot): New helper method.
(findOverlapFreeParent): New helper method.
(findOpaqueParent): New helper method.
* javax/swing/RepaintManager.java
(addDirtyRegion): Collapse overlapping dirty regions into single
regions.
(paintDirtyRegions): Simple iterator over dirty regions and
paint them. The optimizations are done in JComponent and
addDirtyRegion.
Kind regards,
Roman
Swing-Painting.diff
Description: Text Data
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] RFC: Swing painting overhaul,
Roman Kennke <=