You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2010/09/18 14:16:11 UTC
svn commit: r998451 -
/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
Author: gbrown
Date: Sat Sep 18 12:16:11 2010
New Revision: 998451
URL: http://svn.apache.org/viewvc?rev=998451&view=rev
Log:
Add a org.apache.pivot.wtk.disablevolatilebuffer system property to resolve PIVOT-390.
Modified:
pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
URL: http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java?rev=998451&r1=998450&r2=998451&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java Sat Sep 18 12:16:11 2010
@@ -88,6 +88,7 @@ public abstract class ApplicationContext
private double scale = 1;
private boolean paintPending = false;
+ private boolean disableVolatileBuffer = true;
private boolean debugPaint = false;
private Random random = null;
@@ -282,10 +283,16 @@ public abstract class ApplicationContext
}
try {
+ disableVolatileBuffer = Boolean.parseBoolean(System.getProperty("org.apache.pivot.wtk.disablevolatilebuffer"));
+ } catch (SecurityException ex) {
+ // No-op
+ }
+
+ try {
debugPaint = Boolean.parseBoolean(System.getProperty("org.apache.pivot.wtk.debugpaint"));
- if (debugPaint == true)
+ if (debugPaint == true) {
random = new Random();
-
+ }
} catch (SecurityException ex) {
// No-op
}
@@ -390,7 +397,8 @@ public abstract class ApplicationContext
if (clipBounds != null
&& !clipBounds.isEmpty()) {
try {
- if (!paintVolatileBuffered((Graphics2D)graphics)) {
+ if (disableVolatileBuffer
+ || !paintVolatileBuffered((Graphics2D)graphics)) {
if (!paintBuffered((Graphics2D)graphics)) {
paintDisplay((Graphics2D)graphics);
}
@@ -426,6 +434,7 @@ public abstract class ApplicationContext
* buffer; <tt>false</tt>, otherwise.
*/
private boolean paintBuffered(Graphics2D graphics) {
+ System.out.println("PB");
boolean painted = false;
// Paint the display into an offscreen buffer
@@ -464,6 +473,7 @@ public abstract class ApplicationContext
* buffer; <tt>false</tt>, otherwise.
*/
private boolean paintVolatileBuffered(Graphics2D graphics) {
+ System.out.println("PVB");
boolean painted = false;
// Paint the display into a volatile offscreen buffer