chore: add test for screen color toggle

This commit is contained in:
Qingping Hou
2019-04-23 00:21:23 -07:00
committed by Frans de Jonge
parent 11a38b33f1
commit 080c079d01
5 changed files with 27 additions and 9 deletions

View File

@@ -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