no need for synchronized in ExtrusionOverlay

This commit is contained in:
Hannes Janetzek 2013-01-30 10:31:14 +01:00
parent 4e19553f9e
commit 9fa87855fe
2 changed files with 5 additions and 2 deletions

View File

@ -43,6 +43,9 @@ public abstract class BasicOverlay extends RenderOverlay {
layers = new Layers(); layers = new Layers();
} }
/**
* use synchronized when modifying layers
*/
@Override @Override
public synchronized void render(MapPosition pos, float[] mv, float[] proj) { public synchronized void render(MapPosition pos, float[] mv, float[] proj) {
setMatrix(pos, mv); setMatrix(pos, mv);

View File

@ -62,7 +62,7 @@ public class ExtrusionOverlay extends RenderOverlay {
private int mTileCnt; private int mTileCnt;
@Override @Override
public synchronized void update(MapPosition curPos, boolean positionChanged, public void update(MapPosition curPos, boolean positionChanged,
boolean tilesChanged) { boolean tilesChanged) {
mMapView.getMapViewPosition().getMapPosition(mMapPosition, null); mMapView.getMapViewPosition().getMapPosition(mMapPosition, null);
@ -160,7 +160,7 @@ public class ExtrusionOverlay extends RenderOverlay {
private final float[] mVPMatrix = new float[16]; private final float[] mVPMatrix = new float[16];
@Override @Override
public synchronized void render(MapPosition pos, float[] mv, float[] proj) { public void render(MapPosition pos, float[] mv, float[] proj) {
// TODO one could render in one pass to texture and then draw the texture // TODO one could render in one pass to texture and then draw the texture
// with alpha... might be faster. // with alpha... might be faster.