release locked tiles for labeling directly
This commit is contained in:
parent
f5532059ec
commit
c53805aded
@ -542,6 +542,14 @@ public class GLRenderer implements GLSurfaceView.Renderer {
|
||||
return td;
|
||||
}
|
||||
|
||||
public static void releaseTiles(TileSet td) {
|
||||
for (int i = 0; i < td.cnt; i++) {
|
||||
td.tiles[i].unlock();
|
||||
td.tiles[i] = null;
|
||||
}
|
||||
td.cnt = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceChanged(GL10 glUnused, int width, int height) {
|
||||
Log.d(TAG, "SurfaceChanged:" + mNewSurface + " " + width + " " + height);
|
||||
|
@ -48,7 +48,7 @@ public class TextOverlayExp extends BasicOverlay {
|
||||
// private final static String TAG = TextOverlayExp.class.getName();
|
||||
|
||||
private TileSet mTileSet;
|
||||
private LabelThread mThread;
|
||||
private final LabelThread mThread;
|
||||
|
||||
private MapPosition mTmpPos;
|
||||
|
||||
@ -419,6 +419,8 @@ public class TextOverlayExp extends BasicOverlay {
|
||||
//TextItem.printPool();
|
||||
//Log.d(TAG, "new labels: " + count);
|
||||
|
||||
GLRenderer.releaseTiles(mTileSet);
|
||||
|
||||
// pass new labels for rendering
|
||||
synchronized (this) {
|
||||
mNextLayer = tl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user