hwhw/kindlepdfviewer — pull request #461 by tigran123 (2012-10-18 21:34:42+00:00)
Title: Minor optimization of UniReader:drawOrCache()

Cut down one access to a global, one call to C level getPages() and one division on each call to `UniReader:drawOrCache()` function, i.e. on each page draw including panning.

I personally would prefer to get rid of `page_indicator()` altogether (and save 6 function calls + 3 conditional checks), but if @dpavlin thinks it is needed during debugging then at least we can shift the calculation of `pg_w` local variable inside `page_indicator()` function.