Merge pull request #279 from koreader/chrox-master

fix no openssl libversion
Revert "replace viewport check by clamping"

This reverts commit 00d9ef799639fcd906a845cfaf55b2efb3e5bc8a.
What was intended as a fix introduced new bugs.
fix bug in viewport dimension check

actually, two bugs:
- upper limit was checked with bad math.
- the rectangle wasn't properly stored to self.viewport
fix calculation when calculation is not actually needed
Merge pull request #280 from hwhw/master

Viewport related fixes (affecting Kobos)
bugfix: pass update marker by ref, not by value

ioctl() for waiting for refresh/update used a wrong call mechanism
Merge pull request #281 from hwhw/master

bugfix: pass update marker by ref, not by value
fix night mode with viewport

was buggy after refactor
bugfix: logic on parameter test for viewport correction

would affect any device, though would never had triggered, probably.
For correctness sake, this fix.
emulated screen flash on Emulator

This (re-)introduces a simulated "flash" (for now: invert, invert back)
of refresh sections with the Emulator. Since this is only useful when
debugging, it is off by default. It can be enabled by setting an
environment variable EMULATE_READER_FLASH. Set it to the number of
microseconds you want the flash to take. Suggested are values 200-700,
depending on how closely you want to look at refreshes :-)
Merge pull request #282 from hwhw/master

Bug fixes, emulated screen flash
fix rotation with viewport
move initial rotation, fix refresh bug

this moves the code that does initial rotation - for now, on Kobo
devices, which often start up in landscape mode.
Merge pull request #283 from hwhw/master

Fix some funky behaviour
crengine: "code" elements are not block elements, but inline elements
update crengine: fix <code> element

(needs https://github.com/koreader/crengine/pull/5)
Merge pull request #284 from hwhw/epub_code

crengine: "code" elements are not block elements, but inline elements
refresh queuing

This replaces the wait-for-refresh (or "update") logic with a
queue that tracks the updates and will wait only for those updates
that cover overlapping sections with an update newly scheduled.

Adds some debugging output, too.
Merge pull request #285 from hwhw/refresh_tracking

refresh queuing
refresh emulation: only update areas that are refreshed

when refresh emulation is enabled, only the parts of the screen
are actually updated that are being refreshed. This allows to
debug refresh regions with the emulator.
Reminder: activate refresh emulation by setting the environment
variable EMULATE_READER_FLASH to the number of milliseconds that
you want the inverse flash to endure. Suggested are now about
100 (msecs).