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;
|
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
|
@Override
|
||||||
public void onSurfaceChanged(GL10 glUnused, int width, int height) {
|
public void onSurfaceChanged(GL10 glUnused, int width, int height) {
|
||||||
Log.d(TAG, "SurfaceChanged:" + mNewSurface + " " + width + " " + 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 final static String TAG = TextOverlayExp.class.getName();
|
||||||
|
|
||||||
private TileSet mTileSet;
|
private TileSet mTileSet;
|
||||||
private LabelThread mThread;
|
private final LabelThread mThread;
|
||||||
|
|
||||||
private MapPosition mTmpPos;
|
private MapPosition mTmpPos;
|
||||||
|
|
||||||
@ -419,6 +419,8 @@ public class TextOverlayExp extends BasicOverlay {
|
|||||||
//TextItem.printPool();
|
//TextItem.printPool();
|
||||||
//Log.d(TAG, "new labels: " + count);
|
//Log.d(TAG, "new labels: " + count);
|
||||||
|
|
||||||
|
GLRenderer.releaseTiles(mTileSet);
|
||||||
|
|
||||||
// pass new labels for rendering
|
// pass new labels for rendering
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
mNextLayer = tl;
|
mNextLayer = tl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user