Cache is discarded on zoom

Bug #1330779 reported by Martin Spacek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qpdfview
Fix Released
Wishlist
Martin Spacek

Bug Description

Currently, it seems the cache is only used for panning at a given zoom level. Zooming in our out seems to clear the cache and start all over. I'll have a look to see if this is a relatively easy fix. Seems the place for this might be tileitem.cpp

Related branches

Changed in qpdfview:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Adam Reichold (adamreichold) wrote :

Yes, caching of pixmap is done in the TileItem class. In principle, it should be straight forward to key the cache not just on the TileItem but additionally on the rendering parameter. (I would suggest defining a struct with a comparison operator in the global header for that.)
Be aware though that you will sometimes need to completely invalidate the cache, i.e. remove all entries for a given TileItem instance for all rendering parameters, e.g. when an annotation was added or the contents of a form field changed or the TileItem instance is destoryed. This might necessitate enumerating the whole cache or rolling your own data structure and exposing upperBound and lowerBound methods like in QMap.

Changed in qpdfview:
assignee: nobody → Martin Spacek (mspacek)
status: Triaged → In Progress
Changed in qpdfview:
status: In Progress → Fix Committed
milestone: none → 0.4.12
Changed in qpdfview:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.