]> git.itanic.dy.fi Git - maemo-mapper/commitdiff
Improved performance when running without an on-disk cache.
authorgnuite <gnuite@gmail.com>
Sun, 14 Dec 2008 03:22:47 +0000 (03:22 +0000)
committergnuite <gnuite@gmail.com>
Sun, 14 Dec 2008 03:22:47 +0000 (03:22 +0000)
git-svn-id: svn+ssh://garage/var/lib/gforge/svnroot/maemo-mapper/trunk@225 6c538b50-5814-0410-93ad-8bdf4c0149d1

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;