The multi_threads variable should be excluded from the hash as cache
from the multi-threads procedure is valid for non-multi-threads
procedure and vice versa.
when the page reflow is not finished from the bgthread but the main
thread ask to draw the page immediately. We will stay here to wait for
the bgthread.
Because the lua reader is single threaded on which both user inputloop
and background page rendering is processed. Although there is a pretty
good precache system to save user's time spending on waiting for the
rendering when going to the next page, user input is indeed blocked when
running the precache thing. The situation is even worse in koptreader as
reflowing on page would usually take several second, in this period
users cannot move to the next page view even it's already in the cache.
This patch will let precache run in the background in a seperate thread
so that the koptreader is still responsive when precaching the next
page. Now it only just works. Welcome to find out bugs in it.
1. Describe the 'message_importance' parameter correctly in the comments
above :inform() function.
2. Use more appropriate menu titles for event notification dialog.
3. bugfix: save/restore configured event notifications methods in the
settings.
when select a reader to open a document the readerchooser dialog is
overlayed with opening file notification window. The overlayed three
windows(file chooser, reader chooser and notification window) will make
users feel unconfortable easpecially when opening in koptreader which
usually freezes the screen for several seconds.
With this patch the reader chooser dialog is closed before the opening
file noticifation is shown up.
Probably we should use fomit-frame-pointer explicitly even though
fomit-frame-pointer is included by default with -O2 and -O3 just like
the Linux kernel guys doing. I found append -O3 directly to `CFLAGES`
will do the trick. So I removed the KOPT_CFLAGS variable.
In some compilation platform if finite-math-only option is turned
on, math functions like exp and sqrt will be dynamically linked to
finite versions which cannot be located in Kindle's GLIBC. In my
toolchain the symbol __exp_finite cannot be found in GLIBC_2.4 so
gcc just use __exp_finite in GLIBC_2.15, which will cause a run time
error in Kindle saying "version GLIBC_2.15 not found"
Reflow can be configured to use bbox which could remove
side comments and defects in the margin and get much better reflowed
page in some documents. Currently the bbox is only set in PDFReader or
DJVUReader reader. But eventually there will be bbox setting routines in
KOPTReader.
Thirdparty should be cleaned and refetched and remake to get
this feature in operation.