2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

1166 Commits

Author SHA1 Message Date
HW
f073c23296 Switched LuaJIT to shared library instead of static 2012-11-26 13:00:38 -05:00
Tigran Aivazian
15d6f7e851 Add "-a author" option
This option is useful when creating a PDF file with embedded collection
by the same author. Then one can specify the author on the command line
and it will be shown correctly instead of the email address in Amazon's
Personal Documents area.
2012-11-26 12:59:39 -05:00
{Qingping,Dave} Hou
5206ba9790 Merge pull request #639 from chrox/waitforinput-fix
bugfix: waitForInput should return error when select returns zero
2012-11-26 06:52:03 -08:00
chrox
5b0e4b457b bugfix: destroying attr objects immediately after pthread_create 2012-11-26 22:17:27 +08:00
chrox
060eeec1c1 bugfix: reclaim thread stack explicitly by using detached threads
Otherwise the VmData size will keep increasing in multi-threads mode.
Although the increasing VmData size doesn't mean there is enormous
memory leak, it does show that the thread stack is not handled properly
when threads exit.
2012-11-26 22:17:02 +08:00
chrox
b8131a1906 bugfix: get rid of memory leak in koptreader
Memory leak came from the master bitmap that is reused in each reflow. But the bitmap
width and height were not set to zero when bitmap was freed. When the master bitmap was
enlarged in some cases the size of the master bitmap would increase monotonically.
This patch fixes this issue by setting master bitmap width and height to zero at the
beginning of each reflow. And a memeory usage logger is added in koptreader.
2012-11-26 22:16:07 +08:00
chrox
6ac2f69805 remove koptreflow.o in make clean 2012-11-26 22:15:14 +08:00
chrox
7f5e11391f remove unused function dprintf 2012-11-26 22:14:57 +08:00
chrox
fd854c030d cleanup unused variables 2012-11-26 22:14:42 +08:00
chrox
636dbb9543 bugfix: fixed missing words in last line 2012-11-26 22:14:13 +08:00
chrox
edd18c4219 update k2pdfopt to version 1.62 2012-11-26 22:13:43 +08:00
chrox
1502fd2d08 add precache and bmp src in koptcontext 2012-11-26 22:10:49 +08:00
chrox
f981b70ac0 add multi-threaded precache
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.
2012-11-26 22:10:26 +08:00
chrox
0fe8f18591 change default white margin size to 0 2012-11-26 22:09:24 +08:00
chrox
4d14cd69b2 use -O3 option in compiling libk2pdfopt
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.
2012-11-26 22:08:29 +08:00
chrox
f10feb9b94 add -fno-finite-math-only in KOPT_CFLAGS
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"
2012-11-26 22:07:51 +08:00
chrox
ec03261dc6 -fomit-frame-pointer is enabled at level -O, -O2, -O3 2012-11-26 22:07:27 +08:00
chrox
c22c2b3afb no need to mark source page 2012-11-26 22:06:57 +08:00
chrox
7850aab2b0 add libk2pdfopt.so.1 in customupdate 2012-11-26 22:06:04 +08:00
chrox
101e43be0d adjust gamma in k2pdfopt 2012-11-26 22:04:22 +08:00
chrox
5acf471ecb use -O3 option in k2pdfopt compilation
Koptreader will gain 20% performance boost.
2012-11-26 22:03:37 +08:00
chrox
c045205775 bugfix: no need to use crop boxes 2012-11-26 22:03:06 +08:00
chrox
a236688113 update libk2pdfopt 2012-11-26 22:02:43 +08:00
chrox
44361faeee build libk2pdfopt as a shared library 2012-11-26 22:02:09 +08:00
chrox
4494213363 Pulled update to libk2pdfopt 2012-11-26 21:59:55 +08:00
chrox
97066cfdb0 feature: add bbox support in koptreader
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.
2012-11-26 21:59:35 +08:00
chrox
a5b28ff6f2 include k2pdfopt header in pdf.c and djvu.c and koptcontext.h 2012-11-26 21:58:53 +08:00
chrox
8430850a39 move k2pdfopt source to a submodule libk2pdfopt
Currently libk2pdfopt is staticly linked to kpdfview.
2012-11-26 21:58:32 +08:00
chrox
f70ef06ea6 use koptcontext to keep dozons of parameters for k2pdfopt 2012-11-26 21:57:23 +08:00
chrox
3a7535d350 add trim page option 2012-11-26 21:56:22 +08:00
chrox
f4e542306f update K2pdfopt to the latest version 1.60 2012-11-26 21:55:49 +08:00
chrox
f7be331318 add defect size option 2012-11-26 21:55:26 +08:00
chrox
486207ce1b add render quality option
Many users complained that the reflowing process is too slow. This is
rather a speed-quality dilemma. Trade-off can be made by decreasing the
dpi of source page. And by default quality is prefered.
2012-11-26 21:54:47 +08:00
chrox
19c0d282aa add indentation option in koptconfig
By default the indentaion detection is enabled in K2pdfopt. This will
sometimes generate very poor reflowed page when there are sidenotes on
the page which would be treated as indentation. Disabling indentaion
detection will rescue the reflowed page from this situation.
2012-11-26 21:50:34 +08:00
chrox
f503e9c2df bugfix: waitForInput should return error when select returns zero 2012-11-26 18:13:00 +08:00
Qingping Hou
ba3973b2ac add all zoom modes support to reader menu 2012-11-26 15:30:24 +08:00
Qingping Hou
cf3cc65c03 fix bug in multi-level menu support
The size of framecontainer is not reset after content changed.
2012-11-26 15:25:28 +08:00
Qingping Hou
c701248a8d rename Input:setTimeOut to Input:setTimtout
To keep consistent with Javascript setTimeout function...
2012-11-25 15:57:29 +08:00
{Qingping,Dave} Hou
bd132ea2ad Merge pull request #595 from houqp/new_ui_code
some minor tweaks before introducing gesture detection module
2012-11-24 08:24:19 -08:00
Qingping Hou
e3617676a1 fix deprecated debug call in credocument.lua 2012-11-23 01:10:34 -05:00
Qingping Hou
a7b2215249 bug fix in time.lua
a crazy typo
2012-11-23 01:04:56 -05:00
Qingping Hou
324f67412a fix bug in timer_callbacks scheduling & change variable name
watiEvent should stop checking timer_callbacks when execceds
wait timeout set by timeout_us.
2012-11-17 13:51:34 -05:00
Qingping Hou
d3e0424122 add setTimeOut method in inputevent.lua
adapt all the state machine to use setTimeOut. Now supported gestures
includes tap, double tap and hold.
2012-11-17 13:41:26 -05:00
Qingping Hou
b7e62491bc Merge branch 'new_ui_code' into ges-detect 2012-11-16 18:57:29 -05:00
Qingping Hou
a8e4c6ed73 add setTimeOut method in inputevet and use it in gesturedetector 2012-11-16 18:55:13 -05:00
Qingping Hou
dfd697453b add time module 2012-11-16 18:54:01 -05:00
Qingping Hou
f06afb798e rewrite gesturedetector state machine 2012-11-15 19:58:01 -05:00
Qingping Hou
9a4d6d4a2e Merge branch 'new_ui_code' of github.com:houqp/kindlepdfviewer into new_ui_code 2012-11-16 08:22:41 +08:00
Qingping Hou
262d742204 add back waitForInput timeout for emulator 2012-11-16 08:22:23 +08:00
Qingping Hou
63ab121778 Merge branch 'new_ui_code' into ges-detect 2012-11-14 22:16:45 -05:00