blitbuffer: fixups for base (#6714)

fixups for base bumped to https://github.com/koreader/koreader-base/pull/1201
otherwise tilecache breaks
This commit is contained in:
ezdiy
2020-09-28 01:04:59 +02:00
committed by GitHub
parent 6bfa021689
commit 7a40b496fb
4 changed files with 7 additions and 7 deletions

View File

@@ -15,15 +15,15 @@ end
function TileCacheItem:dump(filename)
logger.dbg("dumping tile cache to", filename, self.excerpt)
return serial.dump(self.size, self.excerpt, self.pageno,
self.bb.w, self.bb.h, self.bb.pitch, self.bb:getType(),
self.bb.w, self.bb.h, self.bb.stride, self.bb:getType(),
Blitbuffer.tostring(self.bb), filename)
end
function TileCacheItem:load(filename)
local w, h, pitch, bb_type, bb_data
local w, h, stride, bb_type, bb_data
self.size, self.excerpt, self.pageno,
w, h, pitch, bb_type, bb_data = serial.load(filename)
self.bb = Blitbuffer.fromstring(w, h, bb_type, bb_data, pitch)
w, h, stride, bb_type, bb_data = serial.load(filename)
self.bb = Blitbuffer.fromstring(w, h, bb_type, bb_data, stride)
logger.dbg("loading tile cache from", filename, self)
end