Commit Graph

1764 Commits

Author SHA1 Message Date
Yury Delendik
1ac8ca66f7 Fixes optional backdrop regression 2014-06-10 15:47:25 -05:00
Jonas Jenwald
7802a7ab97 Handle cases where the fontName contains non-alphanumeric characters (issue 4909) 2014-06-10 17:25:49 +02:00
Yury Delendik
b2d8e73d54 Merge pull request #4895 from p01/Small_optimizations_1
Small optimizations 1
2014-06-10 10:09:12 -05:00
Yury Delendik
12bfd206d9 Merge pull request #4867 from yurydelendik/nonalign32
Fixes murmurhash for old webkit.
2014-06-10 09:16:36 -05:00
Yury Delendik
cff2c3afc1 Merge pull request #4892 from yurydelendik/issue4890
Fixes masked JPEG image
2014-06-10 09:16:12 -05:00
Yury Delendik
fc85cfdb83 Merge pull request #4907 from CodingFabian/fix-4906
add object id to streams to prevent infinite loops.
2014-06-10 08:56:25 -05:00
p01
6731de6829 Minor refactoring of EvaluatorPreprocessor_read 2014-06-10 12:37:40 +02:00
p01
e0bf7e2151 Optimized genericComposeSMask
Declaring the composition and backgdrop functions outside of genericComposeSMask
is more efficient.
2014-06-10 12:37:39 +02:00
p01
412febe4a4 canvas.js minor optimizations 2014-06-10 12:37:39 +02:00
p01
35e418c603 Optimized CanvasGraphics_executeOperatorList 66% faster 2014-06-10 12:37:38 +02:00
p01
d4a01f6034 evaluator.js minor optimizations 2014-06-10 12:37:37 +02:00
p01
0a51b1e616 utils.js optimization of isFOO methods 2014-06-10 12:37:36 +02:00
p01
37c9765ab4 Optimized Lexer_getObj 2x faster 2014-06-10 12:37:36 +02:00
Fabian Lange
532d7246ea add object id to streams to prevent infinite loops.
fixes http://bugzil.la/1020858
2014-06-10 11:29:25 +02:00
Jonas Jenwald
26bbcedcae Prevent infinite loop when scanning for endstream (bug 1020226) 2014-06-09 22:42:35 +02:00
Yury Delendik
806aa36aa8 Merge pull request #4897 from CodingFabian/optimize-stream-getCode
Optimization for FlateStream_getCode, making more pdfs parsable.
2014-06-09 14:51:42 -05:00
Fabian Lange
22a0e7fe65 Optimization for FlateStream_getCode, making more pdfs parsable.
This commit cleans up the FlateStream_getCode method, and removes a few error
conditions.
Previously it would fail if the codeSize is less than maxLen if end of stream
is reached. However in the document linked below there is a sub-stream
(the one starting at pos 337) which has maxLen set to 11, but actually
contains only 10. After breaking the sanity check still applies, and in this
case passes validating codeSize(10)==codeLen(10).

 http://www.cafeculture.com/wp-content/uploads/2014/03/V-CM-BR-086-04002-1346-0258-GP-Brazil-Fazenda-Cafe-Cambara-Terra-Preta-Microlot-Sample-0460-13-Pulped-Natural-60Kg.pdf
2014-06-09 20:55:31 +02:00
Yury Delendik
9308c7c82f Merge pull request #4896 from CodingFabian/cleanup-jpgjs-buildComponentData
Deleted unused variables in jpgjs buildComponentData.
2014-06-06 09:48:30 -05:00
Fabian Lange
030a188af7 Deleted unused variables in jpgjs buildComponentData. 2014-06-05 16:20:29 +02:00
Fabian Lange
0a42edf82f Optimize JPG.js receiveAndExtend for 1 bit case.
Profiling showed that receiveAndExtend is frequently called with the length of
one bit. This happens for example in decodeBaseline.
For a single bit, the loop and shift in receive, as well as the shifts in
receiveAndExtend are overhead.
This shortcut manually calculates the shifts by either returning 1 or -1 from
receiveAndExtend by reading the bit and deciding on the return value.
While it comes with an overhead for each non-one length, the speedup is at about
10% in the hot parse/decode path.
2014-06-05 12:24:53 +02:00
Yury Delendik
6b411b559d Fixes masked JPEG image 2014-06-04 15:53:46 -05:00
Yury Delendik
43a103d5d3 Merge pull request #4889 from CodingFabian/optimize-jpg-loops
Optimized loops in JPG conversion.
2014-06-04 15:34:48 -05:00
Yury Delendik
11c12464e3 Merge pull request #4891 from yurydelendik/typo
Fixes typo in getAsync
2014-06-04 13:19:16 -05:00
Yury Delendik
b20b404061 Fixes typo in getAsync 2014-06-04 11:30:53 -05:00
Fabian Lange
dcde59fa76 Optimized loops in JPG conversion.
This change makes the 4 conversion loops look the same.
It optimizes access of the array length and access of the property
numComponents, which is known to be constant.
2014-06-04 10:02:47 +02:00
Yury Delendik
6235e3a61c Adds color components decoding to the JPEG 2014-06-03 08:51:57 -05:00
Yury Delendik
2449142fc3 Merge pull request #4835 from Snuffleupagus/issue-4800
Prevent font error when no preferred cmap table is found (workaround for issue 4800)
2014-06-02 14:42:58 -05:00
Yury Delendik
3acf5709a0 Merge pull request #4876 from Snuffleupagus/issue-4875
Prevent adding undefined array entries to CMap.map in mapRangeToArray (issue 4875)
2014-06-02 14:31:20 -05:00
Yury Delendik
5ded0ea163 Merge pull request #4866 from yurydelendik/issue4673
Removes mozResponseArrayBuffer
2014-06-02 12:51:29 -05:00
Jonas Jenwald
d1c71ab7ad Prevent adding undefined array entries to CMap.map in mapRangeToArray (issue 4875) 2014-06-02 14:29:54 +02:00
Yury Delendik
a09aecb24a Fixes murmurhash for old webkit. 2014-05-29 21:16:32 -05:00
Yury Delendik
9c87fa24f7 Removes mozResponseArrayBuffer 2014-05-29 20:38:50 -05:00
Mohammed Abu-alsaad
e6546642db Added more preference variables from the available hash parameters 2014-05-30 10:44:41 +12:00
Yury Delendik
844bc644fb Merge pull request #4861 from timvandermeij/xobject
Fixes unhandled XObject subtype PS error
2014-05-29 08:40:57 -05:00
Jonas Jenwald
7e6cdc74af Merge pull request #4832 from yurydelendik/showtext
Refactors showText: split type3, remove showSpacedText
2014-05-29 12:58:09 +02:00
Tim van der Meij
e128bdc397 Fixes unhandled XObject subtype PS error 2014-05-29 11:53:13 +02:00
Jonas Jenwald
3c5dedf60d Prevent font error when no preferred cmap table is found (workaround for issue 4800) 2014-05-27 17:30:11 +02:00
koderok
81d3f4a89b merged with earlier commits 2014-05-24 05:37:25 +05:30
Yury Delendik
f000c04b73 Merge pull request #4829 from fkaelberer/optimize_parser_getObj
small optimizations in parser.getObj(), lexer.getObj()
2014-05-23 15:14:18 -05:00
Jonas Jenwald
002607502c Merge pull request #4824 from yurydelendik/movecs
Moves colorspace.js and function.js into core/
2014-05-23 21:14:58 +02:00
Yury Delendik
fcc4dfd9b5 Moves shared/function.js to core/ 2014-05-23 14:11:47 -05:00
Yury Delendik
7a19085159 Moves shared/colorspace.js into core/ 2014-05-23 14:11:47 -05:00
Yury Delendik
542c9c4c7a Moves ColorSpace logic into evaluator 2014-05-23 14:11:47 -05:00
Yury Delendik
d53dc2e7d6 Refactors showText: split type3, remove showSpacedText 2014-05-23 13:36:54 -05:00
fkaelberer
f88118dbf9 small optimizations in parser.getObj(), lexer.getObj() 2014-05-23 09:25:36 +02:00
Samuel Chantaraud
37c3641fad Added Promise.catch
Fixed Promise so it rejects on uncaught exception
Catch possible rejection on ViewHistory.setMultiple
2014-05-22 13:53:19 -04:00
Yury Delendik
f4baea900e Fixes regression in the cleanup 2014-05-20 21:57:04 -05:00
Jonas Jenwald
fe27a76004 Merge pull request #4815 from yurydelendik/loadFont
Refactors loadFont for translateFont be async
2014-05-20 21:30:42 +02:00
p01
455c6b2d35 Removed several 'in' operators in canvas.js
This gives up to 6x speed improvement on these methods
2014-05-20 12:39:59 +02:00
p01
cf5ff3d327 Fewer lookups in CanvasGraphics_constructPath 2014-05-20 12:39:58 +02:00