mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
TileCache: Preserve BlitBuffer's inversion & rotation (#8547)
* TileCache: Preserve BlitBuffer's inversion & rotation This somehow fell through the cracks for all these years ;). (We can't simply save the config field directly, because bb.fromstring always generates an allocated bb, which may not be the case of the source bb). * Bump base https://github.com/koreader/koreader-base/pull/1440
This commit is contained in:
2
base
2
base
Submodule base updated: eb1285d2e3...2e53592573
@@ -24,6 +24,8 @@ function TileCacheItem:totable()
|
||||
h = self.bb.h,
|
||||
stride = tonumber(self.bb.stride),
|
||||
fmt = self.bb:getType(),
|
||||
rotation = self.bb:getRotation(),
|
||||
inverse = self.bb:getInverse(),
|
||||
data = Blitbuffer.tostring(self.bb),
|
||||
},
|
||||
}
|
||||
@@ -54,7 +56,7 @@ function TileCacheItem:fromtable(t)
|
||||
self.excerpt = t.excerpt
|
||||
self.created_ts = t.created_ts
|
||||
self.persistent = t.persistent
|
||||
self.bb = Blitbuffer.fromstring(t.bb.w, t.bb.h, t.bb.fmt, t.bb.data, t.bb.stride)
|
||||
self.bb = Blitbuffer.fromstring(t.bb.w, t.bb.h, t.bb.fmt, t.bb.data, t.bb.stride, t.bb.rotation, t.bb.inverse)
|
||||
end
|
||||
|
||||
function TileCacheItem:load(filename)
|
||||
|
||||
Reference in New Issue
Block a user