Commit Graph

1338 Commits (ddfe5ca3a9f38a78c11dd2e82d33f9bedcd64817)
 

Author SHA1 Message Date
chrox 4dd9232194 recalculate page size after each call of drawPage
Only after renderPage is called can koptdocument update
reflowed page size. And the recalculate acts as a page
size updater here.
12 years ago
chrox aa9fe4b01c cache page size after page is reflowed
So that when page dimension is recalculated right page size
other than screen size is returned.
12 years ago
chrox edf898027a update dst_width and dst_height in k2settings 12 years ago
chrox c462090600 add koptreader demo 12 years ago
chrox 631f56bc78 add screen dpi property in koptcontext 12 years ago
{Qingping,Dave} Hou da87914cbf Merge pull request #634 from houqp/ges-detect
Touch gesture detection module
12 years ago
Tigran Aivazian 0251a00cce No need to cat crash.log on crash.
One cannot start kpdf.sh from a terminal anyway (try it and you will see
that keyboard handling doesn't work), so there is no need to cat the
content of crash.log (to a non-existent terminal) if reader.lua fails.
12 years ago
Tigran Aivazian 42a4c8042b Package defaults.lua and symlink libluajit-5.1.so
1. The file defaults.lua needs to be mentioned in LUA_FILES in order to
be packaged by "make customupdate".
2. The problem with the linker not finding libluajit-5.1.so.2 can be
fixed without specifying the shared library in the list of objects (and
static libraries), simply by making a symbolic link. No need to copy a
duplicate.

Conflicts:

	Makefile
12 years ago
Tigran Aivazian 9d9100c5bf No need to set LD_LIBRARY_PATH
As we use -Wl,-rpath=$(LIBDIR)/ the RPATH is hardcoded in the kpdfview
binary and so there is no need to help the linker find our libraries.
12 years ago
HW e129307c40 Fixed initialization/update of mupdf's submodules, build "release" version of build helpers 12 years ago
Qingping Hou a123e5157f remove comments 12 years ago
HW 503fefe7ec moved luajit-2.0 and mupdf to latest version - now really
Conflicts:

	Makefile
12 years ago
HW 77866a4bd4 disabled patching of libjpeg, restructured everything for mupdf subrepos
Conflicts:

	Makefile
12 years ago
HW 6d66c43a6f changes due to mupdf updates (third party libraries) 12 years ago
HW e26ae14bed updated mupdf to latest version
Conflicts:

	Makefile
12 years ago
Tigran Aivazian b3b3d04c98 Create history and clipboard dirs for the emulator 12 years ago
Qingping Hou d57ac2e756 Use the font DroidSansFallbackFull.ttf in font.lua 12 years ago
Tigran Aivazian 80fb6c21cc Use the font DroidSansFallbackFull.ttf
Conflicts:

	font.lua
12 years ago
kai771 77a322f45f Implements Kindle screen rotate on emulator
Conflicts:

	einkfb.c
12 years ago
Tigran Aivazian f2f299cd09 Bugfix: link with the static libjpeg.a
We should explicitly link with the libjpeg.a from mupdf/thirdparty and not with the
shared libjpeg.so that may happen to be installed on the system.

Conflicts:

	Makefile
12 years ago
Qingping Hou 44a0bf33ac Merge branch 'new_ui_code' of github.com:hwhw/kindlepdfviewer into new_ui_code
Conflicts:
	Makefile
12 years ago
{Qingping,Dave} Hou 170eb2dab6 Merge pull request #640 from chrox/kopt-backend
catchup: now kopt-backend is updated to master tree
12 years ago
HW f073c23296 Switched LuaJIT to shared library instead of static 12 years ago
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.
12 years ago
{Qingping,Dave} Hou 5206ba9790 Merge pull request #639 from chrox/waitforinput-fix
bugfix: waitForInput should return error when select returns zero
12 years ago
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