1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00
pdf.js/src
Jonas Jenwald 7273795eb6 Actually transfer eligible ImageMask data, rather than always copying it
By transfering `ArrayBuffer`s you can avoid having two copies of the same data, i.e. one copy on each of the worker/main-thread, for data that's used only *once* on the worker-thread.

Note how the code in [`PDFImage.createMask`](80135378ca/src/core/image.js (L284-L285)) goes to great lengths to actually enable tranfering of the image data. However in [`PartialEvaluator.buildPaintImageXObject`](80135378ca/src/core/evaluator.js (L336)) the `cached` property is always set to `true`, which disqualifies the image data from being transfered; see [`getTransfers`](80135378ca/src/core/operator_list.js (L552-L554)).

For most ImageMask data this patch won't matter, since images found in the `/Resources -> /XObject` dictionary will always be indexed by name. However for *inline* images which contains ImageMask data, where only "small" images are cached (in both `parser.js` and `evaluator.js`), the current code will result in some unnecessary memory usage.
2019-03-16 13:06:32 +01:00
..
core Actually transfer eligible ImageMask data, rather than always copying it 2019-03-16 13:06:32 +01:00
display Small clean-up of the PDFDocumentProxy.destroy method and related code 2019-03-12 13:25:29 +01:00
images Vectorize the logo. 2012-10-29 14:08:52 -04:00
shared Try to improve text-selection for Type3 fonts that utilize a non-default /FontMatrix (bug 1513120) 2019-03-12 10:32:08 +01:00
doc_helper.js [api-major] Completely remove the global PDFJS object 2018-03-01 18:13:27 +01:00
interfaces.js Move the interface definitions out of src/core/worker.js and into their own file 2018-11-08 13:21:37 +01:00
license_header.js Update the year in the license_header files 2019-02-24 00:35:42 +01:00
license_header_libre.js Update the year in the license_header files 2019-02-24 00:35:42 +01:00
pdf.image_decoders.js Add a gulp image_decoders command to allow packaging/distributing the image decoders (i.e. jpg.js, jpx.js, jbig2.js) separately from the main PDF.js library 2018-06-16 17:56:54 +02:00
pdf.js Avoid using the Fetch API, in GENERIC builds, for unsupported protocols (issue 10587) 2019-02-27 13:04:20 +01:00
pdf.worker.entry.js Rename the globals to shorter names. 2018-03-16 11:08:56 -07:00
pdf.worker.js Stop bundling the ReadableStream polyfill in MOZCENTRAL builds (PR 10470 follow-up) 2019-01-23 20:33:20 +01:00
worker_loader.js Moves global scope out of shared/util. 2017-08-22 18:20:52 -05:00