- Timestamp:
- 2016-09-19T19:21:49+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r11028 r11029 29 29 import java.util.TreeSet; 30 30 import java.util.concurrent.CopyOnWriteArrayList; 31 import java.util.concurrent.atomic.AtomicBoolean; 31 32 32 33 import javax.swing.AbstractButton; … … 215 216 private final transient List<Layer> nonChangedLayers = new ArrayList<>(); 216 217 private int lastViewID; 217 private boolean paintPreferencesChanged = true;218 private AtomicBoolean paintPreferencesChanged = new AtomicBoolean(true); 218 219 private Rectangle lastClipBounds = new Rectangle(); 219 220 private transient MapMover mapMover; … … 466 467 } 467 468 468 boolean canUseBuffer; 469 470 synchronized (this) { 471 canUseBuffer = !paintPreferencesChanged; 472 paintPreferencesChanged = false; 473 } 474 canUseBuffer = canUseBuffer 469 boolean canUseBuffer = !paintPreferencesChanged.getAndSet(false) 475 470 && nonChangedLayers.size() <= nonChangedLayersCount 476 471 && lastViewID == getViewID() … … 711 706 @Override 712 707 public void preferenceChanged(PreferenceChangeEvent e) { 713 synchronized (this) { 714 paintPreferencesChanged = true; 715 } 708 paintPreferencesChanged.set(true); 716 709 } 717 710
Note:
See TracChangeset
for help on using the changeset viewer.