Update bitmap cache
This commit is contained in:
parent
5773a4ca13
commit
a0e52f355f
1 changed files with 6 additions and 0 deletions
|
@ -41,9 +41,11 @@ public class AsyncLoadingThread extends Thread {
|
|||
while (true) {
|
||||
try {
|
||||
updateBitmapTilesCache();
|
||||
int cacheCounter = 0;
|
||||
boolean tileLoaded = false;
|
||||
boolean mapLoaded = false;
|
||||
while (!requests.isEmpty()) {
|
||||
cacheCounter++;
|
||||
Object req = requests.pop();
|
||||
if (req instanceof TileLoadDownloadRequest) {
|
||||
TileLoadDownloadRequest r = (TileLoadDownloadRequest) req;
|
||||
|
@ -58,6 +60,10 @@ public class AsyncLoadingThread extends Thread {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (cacheCounter == 10) {
|
||||
cacheCounter = 0;
|
||||
updateBitmapTilesCache();
|
||||
}
|
||||
}
|
||||
if (tileLoaded || mapLoaded) {
|
||||
// use downloader callback
|
||||
|
|
Loading…
Reference in a new issue