From 80f83d218e3ab55a3a4bd61cd68decadb5811583 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Tue, 19 May 2015 20:03:45 -0400 Subject: [PATCH] seems to be fixing some redraw problems --- core/src/processing/core/PSurfaceAWT.java | 10 ++++++++-- core/src/processing/core/PSurfaceNone.java | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/processing/core/PSurfaceAWT.java b/core/src/processing/core/PSurfaceAWT.java index 5ee737b0a..649a76c4d 100644 --- a/core/src/processing/core/PSurfaceAWT.java +++ b/core/src/processing/core/PSurfaceAWT.java @@ -88,7 +88,7 @@ public class PSurfaceAWT extends PSurfaceNone { */ canvas = new SmoothCanvas(); // if (useStrategy) { - canvas.setIgnoreRepaint(true); + //canvas.setIgnoreRepaint(true); // } // Pass tab key to the sketch, rather than moving between components @@ -210,6 +210,12 @@ public class PSurfaceAWT extends PSurfaceNone { // System.out.println("painting"); // if (useStrategy) { render(); + /* + if (graphics != null) { + System.out.println("drawing to screen " + canvas); + screen.drawImage(graphics.image, 0, 0, sketchWidth, sketchHeight, null); + } + */ // } else { //// new Exception("painting").printStackTrace(System.out); @@ -1428,4 +1434,4 @@ public class PSurfaceAWT extends PSurfaceNone { void debug(String format, Object ... args) { System.out.format(format + "%n", args); } -} \ No newline at end of file +} diff --git a/core/src/processing/core/PSurfaceNone.java b/core/src/processing/core/PSurfaceNone.java index ec83cb951..d11869140 100644 --- a/core/src/processing/core/PSurfaceNone.java +++ b/core/src/processing/core/PSurfaceNone.java @@ -367,4 +367,4 @@ public class PSurfaceNone implements PSurface { } } } -} \ No newline at end of file +}