Added a cache to the page image viewer. This makes pdf viewing more convenient since you can flip back and forth between pages that are stored in the cache. The new command-line option -c allows the user to specify the maximum number of bitmaps to store.
Beyond pdf documents I tried opening several images at once, and it seems to work as expected: the rendered images are saved to the cache and once a few are loaded flipping between them is instant!
It would probably be nice if we start rendering the next page in the background, but I haven't attempted this yet -- let's see if this patch is satisfactory first.
For the manual page we can add something like:
As pages are rendered resulting bitmaps are cached to allow for fast page flipping.
The -c option is used to specify the maximum number of frames for the cache to keep around (default 15).
The page number and rotation angle uniquely identify a rendered page in the cache.
This means that a given page can exist in the cache up to four times (once for each angle).
Zack Folkerts
[email protected]
|