mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
cleanup after experiments
This commit is contained in:
2
base
2
base
Submodule base updated: 0a006a6f28...b7bea84650
@@ -573,7 +573,7 @@ function Document:drawPagePart(pageno, native_rect, rotation)
|
||||
rect.scaled_rect = scaled_rect
|
||||
|
||||
-- Enable SMP via the hinting flag
|
||||
local tile = self:renderPage(pageno, rect, zoom, rotation, 1.0, 0x000000, 0xFFFFFF, true)
|
||||
local tile = self:renderPage(pageno, rect, zoom, rotation, 1.0, 255, true)
|
||||
return tile.bb, rotate
|
||||
end
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@ function KoptInterface:getCoverPageImage(doc)
|
||||
local native_size = Document.getNativePageDimensions(doc, 1)
|
||||
local canvas_size = CanvasContext:getSize()
|
||||
local zoom = math.min(canvas_size.w / native_size.w, canvas_size.h / native_size.h)
|
||||
local tile = Document.renderPage(doc, 1, nil, zoom, 0, 1.0, 0x000000, 0xFFFFFF)
|
||||
local tile = Document.renderPage(doc, 1, nil, zoom, 0, 1.0, 255)
|
||||
if tile then
|
||||
return tile.bb:copy()
|
||||
end
|
||||
@@ -551,7 +551,7 @@ Draw cached tile pixels into target blitbuffer.
|
||||
Inherited from common document interface.
|
||||
--]]
|
||||
function KoptInterface:drawContextPage(doc, target, x, y, rect, pageno, zoom, rotation)
|
||||
local tile = self:renderPage(doc, pageno, rect, zoom, rotation, 1.0, 0x000000, 0xFFFFFF)
|
||||
local tile = self:renderPage(doc, pageno, rect, zoom, rotation, 1.0, 255)
|
||||
target:blitFrom(tile.bb,
|
||||
x, y,
|
||||
rect.x - tile.excerpt.x,
|
||||
|
||||
@@ -20,7 +20,7 @@ describe("Cache module", function()
|
||||
|
||||
it("should serialize blitbuffer", function()
|
||||
for pageno = 1, math.min(max_page, doc.info.number_of_pages) do
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 0x000000, 0xFFFFFF)
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 255)
|
||||
DocCache:serialize()
|
||||
end
|
||||
DocCache:clear()
|
||||
@@ -28,7 +28,7 @@ describe("Cache module", function()
|
||||
|
||||
it("should deserialize blitbuffer", function()
|
||||
for pageno = 1, math.min(max_page, doc.info.number_of_pages) do
|
||||
doc:hintPage(pageno, 1, 0, 1.0, 0x000000, 0xFFFFFF)
|
||||
doc:hintPage(pageno, 1, 0, 1.0, 255)
|
||||
end
|
||||
DocCache:clear()
|
||||
end)
|
||||
@@ -36,7 +36,7 @@ describe("Cache module", function()
|
||||
it("should serialize koptcontext", function()
|
||||
doc.configurable.text_wrap = 1
|
||||
for pageno = 1, math.min(max_page, doc.info.number_of_pages) do
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 0x000000, 0xFFFFFF)
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 255)
|
||||
doc:getPageDimensions(pageno)
|
||||
DocCache:serialize()
|
||||
end
|
||||
@@ -46,7 +46,7 @@ describe("Cache module", function()
|
||||
|
||||
it("should deserialize koptcontext", function()
|
||||
for pageno = 1, math.min(max_page, doc.info.number_of_pages) do
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 0x000000, 0xFFFFFF)
|
||||
doc:renderPage(pageno, nil, 1, 0, 1.0, 255)
|
||||
end
|
||||
DocCache:clear()
|
||||
end)
|
||||
|
||||
@@ -23,7 +23,7 @@ describe("PDF benchmark:", function()
|
||||
end
|
||||
for pageno = 1, math.min(9, doc.info.number_of_pages) do
|
||||
local secs, usecs = util.gettime()
|
||||
assert.truthy(doc:renderPage(pageno, nil, 1, 0, 1.0, 0x000000, 0xFFFFFF))
|
||||
assert.truthy(doc:renderPage(pageno, nil, 1, 0, 1.0, 255))
|
||||
local nsecs, nusecs = util.gettime()
|
||||
local dur = nsecs - secs + (nusecs - usecs) / 1000000
|
||||
logDuration(logfile, pageno, dur)
|
||||
|
||||
Reference in New Issue
Block a user