diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-03-19 20:19:06 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-03-20 11:29:00 +0000 |
commit | 6f1a3ce9dd2821042b146fb928c215b2d0549a3e (patch) | |
tree | b7bba8fcc16e4dffa7c4184e8373f8491802c75c /android | |
parent | 9e937ba0965bcf11948a9b3ea5eb6d700df65bc9 (diff) | |
download | mupdf-6f1a3ce9dd2821042b146fb928c215b2d0549a3e.tar.xz |
Add caching of rendered tiles.
This requires a slight change to the device interface.
Callers that use fz_begin_tile will see no change (and no caching
will be done). We add a new fz_begin_tile_id function that takes an
extra 'id' parameter, and returns 0 or 1. If the id is 0 then the
function behaves exactly as fz_being_tile does, and always returns 0.
The PDF and XPS code continues to call the old (uncached) version.
The display list code however generates a unique id for every
BEGIN_TILE node, and passes this in.
If the id is non zero, then it is taken to be a unique identifier
for this tile; the implementer of the fz_begin_tile_id entry point
can choose to use this to implement caching. If it chooses to ignore
the id (and do no caching), it returns 0.
If the device implements caching, then it can check on entry for a
previously rendered tile with the appropriate matrix and a matching id.
If it finds one, then it returns 1. It is the callers responsibility
to then skip over all the device calls that would usually happen to
render the tiles (i.e. to skip forward to the matching 'END_TILE'
operation).
Diffstat (limited to 'android')
0 files changed, 0 insertions, 0 deletions