Commit Graph

1093 Commits (5b0e4b457bb49256be3d573ba2d0cefdf689e743)
 

Author SHA1 Message Date
chrox 5b0e4b457b bugfix: destroying attr objects immediately after pthread_create 12 years ago
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.
12 years ago
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.
12 years ago
chrox 6ac2f69805 remove koptreflow.o in make clean 12 years ago
chrox 7f5e11391f remove unused function dprintf 12 years ago
chrox fd854c030d cleanup unused variables 12 years ago
chrox 636dbb9543 bugfix: fixed missing words in last line 12 years ago
chrox edd18c4219 update k2pdfopt to version 1.62 12 years ago
chrox 1502fd2d08 add precache and bmp src in koptcontext 12 years ago
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.
12 years ago
chrox 0fe8f18591 change default white margin size to 0 12 years ago
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.
12 years ago
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"
12 years ago
chrox ec03261dc6 -fomit-frame-pointer is enabled at level -O, -O2, -O3 12 years ago
chrox c22c2b3afb no need to mark source page 12 years ago
chrox 7850aab2b0 add libk2pdfopt.so.1 in customupdate 12 years ago
chrox 101e43be0d adjust gamma in k2pdfopt 12 years ago
chrox 5acf471ecb use -O3 option in k2pdfopt compilation
Koptreader will gain 20% performance boost.
12 years ago
chrox c045205775 bugfix: no need to use crop boxes 12 years ago
chrox a236688113 update libk2pdfopt 12 years ago
chrox 44361faeee build libk2pdfopt as a shared library 12 years ago
chrox 4494213363 Pulled update to libk2pdfopt 12 years ago
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.
12 years ago
chrox a5b28ff6f2 include k2pdfopt header in pdf.c and djvu.c and koptcontext.h 12 years ago
chrox 8430850a39 move k2pdfopt source to a submodule libk2pdfopt
Currently libk2pdfopt is staticly linked to kpdfview.
12 years ago
chrox f70ef06ea6 use koptcontext to keep dozons of parameters for k2pdfopt 12 years ago
chrox 3a7535d350 add trim page option 12 years ago
chrox f4e542306f update K2pdfopt to the latest version 1.60 12 years ago
chrox f7be331318 add defect size option 12 years ago
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.
12 years ago
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.
12 years ago
{Qingping,Dave} Hou bd132ea2ad Merge pull request #595 from houqp/new_ui_code
some minor tweaks before introducing gesture detection module
12 years ago
Qingping Hou e3617676a1 fix deprecated debug call in credocument.lua 12 years ago
Qingping Hou 9a4d6d4a2e Merge branch 'new_ui_code' of github.com:houqp/kindlepdfviewer into new_ui_code 12 years ago
Qingping Hou 262d742204 add back waitForInput timeout for emulator 12 years ago
Qingping Hou 85341d86b9 Merge branch 'new_ui_code' of github.com:houqp/kindlepdfviewer into new_ui_code 12 years ago
Qingping Hou 263c8bb110 add time subtable to lua inputevent table 12 years ago
Qingping Hou 36a4ead630 update document.lua according to API change in cre.cpp 12 years ago
Qingping Hou 818043752f refine single tap touch input simulation in input.c 12 years ago
{Qingping,Dave} Hou 8784d20816 Merge pull request #534 from houqp/new_ui_code
rewrite emu mode input handling
12 years ago
Qingping Hou ba60e641a9 add emu_event to clean target 12 years ago
Qingping Hou e000bde0be remove old comment in inputevent init 12 years ago
Qingping Hou 03595f8701 use os.remove instead of calling "rm" in os.execute 12 years ago
Qingping Hou ad089c4930 delete unused macro in input.c 12 years ago
Qingping Hou 02d48dee3d use only one process for emu input event emulation
Seems that SDL is not thread-safe, so forking leads to some
strange bugs. Thus I switch back to one process implementaion.
12 years ago
Qingping Hou 9fca67b6cb add back type casting when sending event to lua stack 12 years ago
Qingping Hou c90e2ae797 delete dulplicate code 12 years ago
Qingping Hou c96fc292f9 adapt inputevent.lua to new emu input implementaion 12 years ago
Qingping Hou 3be08ec515 use fifofile for emu event piping
Using fifofile to pipe event makes it possible for other programs to
feed KPV input events. One use case for this might be automated testing.
12 years ago
Qingping Hou f2bd4666fc rewrite input module for emulator
In order to use mouse to simulate touch input, we have to
generate multiple events on single SDL mouse click event.
It is every hard to achieve this in original implementaion
so I used pipe to fake a input dev as slider_watcher did.
12 years ago