A random assortment of fixes (#9513)

* Android: Make sure sdcv can find the STL
* DocCache: Be less greedy when serializing to disk, and only do that for the *current* document ;).
* CanvasContext: Explicitly document API quirks.
* Fontlist: Switch the on-disk Persist format to zstd (it's ever so slightly faster).
* Bump base for https://github.com/koreader/koreader-base/pull/1515 (fix #9506)
This commit is contained in:
NiLuJe
2022-09-14 03:49:50 +02:00
committed by GitHub
parent e89d856ad9
commit 13e8213e0a
13 changed files with 127 additions and 83 deletions

View File

@@ -285,6 +285,7 @@ function KoptInterface:getCachedContext(doc, pageno)
self.last_context_size = fullwidth * fullheight + 3072 -- estimation
DocCache:insert(hash, ContextCacheItem:new{
persistent = true,
doc_path = doc.file,
size = self.last_context_size,
kctx = kc
})
@@ -411,6 +412,7 @@ function KoptInterface:renderOptimizedPage(doc, pageno, rect, zoom, rotation, re
-- prepare cache item with contained blitbuffer
local tile = TileCacheItem:new{
persistent = true,
doc_path = doc.file,
excerpt = Geom:new{
x = 0, y = 0,
w = fullwidth,
@@ -576,6 +578,7 @@ function KoptInterface:getNativeTextBoxes(doc, pageno)
kc = self:createContext(doc, pageno)
DocCache:insert(kctx_hash, ContextCacheItem:new{
persistent = true,
doc_path = doc.file,
size = self.last_context_size or self.default_context_size,
kctx = kc,
})