limit number of tile data uploads per frame
This commit is contained in:
parent
d6ec9a1c6d
commit
e7aeb92b12
@ -36,6 +36,7 @@ public abstract class TileRenderer extends LayerRenderer {
|
|||||||
|
|
||||||
/** fade-in time */
|
/** fade-in time */
|
||||||
protected static final float FADE_TIME = 500;
|
protected static final float FADE_TIME = 500;
|
||||||
|
protected static final int MAX_TILE_LOAD = 1;
|
||||||
|
|
||||||
private TileManager mTileManager;
|
private TileManager mTileManager;
|
||||||
|
|
||||||
@ -181,6 +182,9 @@ public abstract class TileRenderer extends LayerRenderer {
|
|||||||
if (t != null && t.state == NEW_DATA)
|
if (t != null && t.state == NEW_DATA)
|
||||||
uploadCnt += uploadTileData(t);
|
uploadCnt += uploadTileData(t);
|
||||||
}
|
}
|
||||||
|
if (uploadCnt >= MAX_TILE_LOAD) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return uploadCnt;
|
return uploadCnt;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user