summaryrefslogtreecommitdiff
path: root/altosuilib/AltosUIMapView.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-12 14:12:08 -0700
committerKeith Packard <keithp@keithp.com>2014-06-12 14:12:08 -0700
commit8044eb8e23366e91c741060939baff5137f841c7 (patch)
tree82d8676369d840051b91a462859a3883bb678a80 /altosuilib/AltosUIMapView.java
parente00ffe6ab6197ab48ba8ce3cf71a197f7215649f (diff)
altosui/telegps: Reduce CPU time needed for flight displays
Don't update displays which aren't shown; track hierarchy changes to trigger display from most recent state data. Don't update values which haven't changed; remember previous values and compare with new before updating widget contents. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib/AltosUIMapView.java')
-rw-r--r--altosuilib/AltosUIMapView.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/altosuilib/AltosUIMapView.java b/altosuilib/AltosUIMapView.java
index 70198682..efae3767 100644
--- a/altosuilib/AltosUIMapView.java
+++ b/altosuilib/AltosUIMapView.java
@@ -28,7 +28,7 @@ import java.util.*;
import java.util.concurrent.*;
import org.altusmetrum.altoslib_4.*;
-public class AltosUIMapView extends Canvas implements MouseMotionListener, MouseListener, MouseWheelListener, ComponentListener, AltosUIMapTileListener, AltosUIMapStoreListener {
+public class AltosUIMapView extends Component implements MouseMotionListener, MouseListener, MouseWheelListener, ComponentListener, AltosUIMapTileListener, AltosUIMapStoreListener {
AltosUIMapPath path = new AltosUIMapPath();
@@ -422,7 +422,6 @@ public class AltosUIMapView extends Canvas implements MouseMotionListener, Mouse
}
public void paint(Graphics g) {
-
VolatileImage back_buffer = create_back_buffer();
do {
GraphicsConfiguration gc = getGraphicsConfiguration();