summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2006-06-14 16:11:57 +0000
committerRoman Kennke <roman@kennke.org>2006-06-14 16:11:57 +0000
commitd648afb99278bf71653a72d91f17f7620852e72f (patch)
tree60678eca970ed657e298dd1c61f9dc3757a6f809
parent5c41048eed58fa50d1985dad94ca5999dab99e02 (diff)
downloadclasspath-d648afb99278bf71653a72d91f17f7620852e72f.tar.gz
2006-06-14 Roman Kennke <kennke@aicas.com>
* javax/swing/RepaintManager.java (MERGE_REGIONS): New constant flag. (commitBuffer): Exclude the merging of regions by default. This was causing painting artifacts in some applications, especially when different areas of the GUI are updated synchronously.
-rw-r--r--ChangeLog8
-rw-r--r--javax/swing/RepaintManager.java9
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c0cb7caf6..275c0e33c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2006-06-14 Roman Kennke <kennke@aicas.com>
+ * javax/swing/RepaintManager.java
+ (MERGE_REGIONS): New constant flag.
+ (commitBuffer): Exclude the merging of regions by default. This
+ was causing painting artifacts in some applications, especially
+ when different areas of the GUI are updated synchronously.
+
+2006-06-14 Roman Kennke <kennke@aicas.com>
+
* examples/gnu/classpath/examples/awt/AicasGraphicsBenchmark.java:
New file. This is a benchmark for AWT 1.1 style graphics operations.
* examples/gnu/classpath/examples/awt/palme.gif: New file.
diff --git a/javax/swing/RepaintManager.java b/javax/swing/RepaintManager.java
index a82b3163a..914046b49 100644
--- a/javax/swing/RepaintManager.java
+++ b/javax/swing/RepaintManager.java
@@ -38,7 +38,6 @@ exception statement from your version. */
package javax.swing;
-import java.applet.Applet;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
@@ -78,6 +77,12 @@ public class RepaintManager
static WeakHashMap currentRepaintManagers;
/**
+ * Used to disable merging of regions in commitBuffer(). This has caused
+ * problems and may either need to be reworked or removed.
+ */
+ private static final boolean MERGE_REGIONS = false;
+
+ /**
* A rectangle object to be reused in damaged regions calculation.
*/
private static Rectangle rectCache = new Rectangle();
@@ -661,7 +666,7 @@ public class RepaintManager
{
// If the RepaintManager is not currently painting, then directly
// blit the requested buffer on the screen.
- if (! repaintUnderway)
+ if (! MERGE_REGIONS || ! repaintUnderway)
{
blitBuffer(root, rootRect);
}