]> git.itanic.dy.fi Git - maemo-mapper/blobdiff - src/display.c
Improved performance when running without an on-disk cache.
[maemo-mapper] / src / display.c
index f1182652d78aeeb3a4dbf7f70b6e2e0e7a8bc4e7..381b92339912b6eda9b3679ab2916ad03f975ab9 100644 (file)
@@ -1811,7 +1811,7 @@ thread_render_map(MapRenderTask *mrt)
                 }
 
                 /* Iteratively try to retrieve a map to draw the tile. */
-                while((mrt->zoom + zoff) <= MAX_ZOOM && zoff < TILE_SIZE_P2)
+                while((mrt->zoom + zoff) <= MAX_ZOOM && zoff < 4)
                 {
                     /* Check if we're actually going to draw this map. */
                     if(tile_dev[2 * (y*num_tilex + x)] != FLT_MAX)
@@ -1909,7 +1909,7 @@ thread_render_map(MapRenderTask *mrt)
                     }
 
                     /* Try again at a coarser resolution. Only for underlying map.*/
-                    if (repo_p == mrt->repo)
+                    if (repo_p == mrt->repo && repo_p->type != REPOTYPE_NONE)
                         ++zoff;
                     else
                         break;