1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 17:48:07 +02:00

Merge pull request #8388 from Snuffleupagus/issue-8380

Cache JPEG images, just as we do for other image formats, in `evaluator.js` (issue 8380)
This commit is contained in:
Yury Delendik 2017-05-17 17:25:51 -05:00 committed by GitHub
commit 5dc8dcdc0f
3 changed files with 16 additions and 3 deletions

View file

@ -474,9 +474,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
NativeImageDecoder.isSupported(image, this.xref, resources)) {
// These JPEGs don't need any more processing so we can just send it.
operatorList.addOp(OPS.paintJpegXObject, args);
this.handler.send('obj',
[objId, this.pageIndex, 'JpegStream',
image.getIR(this.options.forceDataSchema)]);
this.handler.send('obj', [objId, this.pageIndex, 'JpegStream',
image.getIR(this.options.forceDataSchema)]);
if (cacheKey) {
imageCache[cacheKey] = {
fn: OPS.paintJpegXObject,
args,
};
}
return;
}