mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
chore: add test for screen color toggle
This commit is contained in:
committed by
Frans de Jonge
parent
11a38b33f1
commit
080c079d01
@@ -32,12 +32,14 @@ The following key is required for a device object:
|
||||
* getDPI() -> int
|
||||
* getSize() -> Rect
|
||||
* scaleBySize(int) -> int
|
||||
* isColorEnabled() -> boolean
|
||||
]]--
|
||||
function CanvasContext:init(device)
|
||||
self.screen = device.screen
|
||||
self.isAndroid = device.isAndroid
|
||||
self.isKindle = device.isKindle
|
||||
self.should_restrict_JIT = device.should_restrict_JIT
|
||||
self:setColorRenderingEnabled(device.screen.isColorEnabled())
|
||||
|
||||
-- NOTE: Kobo's fb is BGR, not RGB. Handle the conversion in MuPDF if needed.
|
||||
if device:hasBGRFrameBuffer() then
|
||||
|
||||
Reference in New Issue
Block a user