tianqi22 / apv

Automatically exported from code.google.com/p/apv
GNU General Public License v3.0
0 stars 0 forks source link

Tile queue #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I think APV might benefit from maintaining and updating an ordered queue tiles 
to be rendered, ordered by importance rather than time.  The tiles that overlap 
the visible area get maximum importance.  The tiles to the right and left of 
the visible area get the next levels of importance.  After that, tiles in the 
screen directly below the visible area, then tiles in the screen directly above 
the visible area, and then tiles further and further down the file.  

DrawPages() can then maintain the queue, updating the tile priorities as 
needed.  We then have an always-active single worker thread which keeps on 
rendering tiles as long as it can add them to the cache without bumping 
anything of higher priority from the cache.  If it can't add anything to the 
cache without a bump, it goes to sleep until the next queue update from 
DrawPages().

Currently, the queue keeps the present screen and the screen vertically below 
it, and then as much back history as can fit.  But the back history isn't as 
useful as pre-rendering forward and to the sides would be, at least for typical 
usage scenarios.

Original issue reported on code.google.com by arpruss on 1 Aug 2011 at 7:09

GoogleCodeExporter commented 9 years ago

Original comment by arpruss on 1 Aug 2011 at 7:09