GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

PSwing components cause full page re-rendering on add/remove operations #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Turn on region debugging
2. Add some PSwing components to a canvas
3. Remove one of the PSwing components

What is the expected output? What do you see instead?
On both addition and removal, the whole canvas will be redrawn, causing
rendering delays for a complicated UI.

Proposed fix:
--- C:/dev/piccolo.java-all/extras/edu/umd/cs/piccolox/pswing/PSwing.java
(revision 7)
+++ C:/dev/piccolo.java-all/extras/edu/umd/cs/piccolox/pswing/PSwing.java
(revision 8)
     private void updateCanvas( PSwingCanvas newCanvas ) {
...
                 reshape();
                 repaint();
-                canvas.invalidate();
-                canvas.revalidate();
-                canvas.repaint();
             }
         }
     }

Original issue reported on code.google.com by steveonjava on 24 Jun 2008 at 7:26

GoogleCodeExporter commented 9 years ago

Original comment by steveonjava on 25 Jun 2008 at 6:35

GoogleCodeExporter commented 9 years ago

Original comment by steveonjava on 2 Jul 2008 at 12:28

GoogleCodeExporter commented 9 years ago

Original comment by steveonjava on 3 Jul 2008 at 5:05

GoogleCodeExporter commented 9 years ago
Committed to trunk.

commit -m "Issue 14 ; removing unnecessary invalidate/revalidate and repaint of
PSwingCanvas"
    Sending       
piccolo2d.java-trunk/extras/src/main/java/edu/umd/cs/piccolox/pswing/PSwing.java
    Transmitting file data ...
    Committed revision 392.

Original comment by heue...@gmail.com on 7 Oct 2008 at 8:06

GoogleCodeExporter commented 9 years ago
Fix causes only dirty region to bubble up to the top.

Original comment by allain.lalonde on 5 Nov 2009 at 4:41