mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Improve performances with image masks (bug 857031)
- it's the second part of the fix for https://bugzilla.mozilla.org/show_bug.cgi?id=857031; - some image masks can be used several times but at different positions; - an image need to be pre-process before to be rendered: * rescale it; * use the fill color/pattern. - the two operations above are time consuming so we can cache the generated canvas; - the cache key is based on the current transform matrix (without the translation part) and the current fill color when it isn't a pattern. - the rendering of the pdf in the above bug is really faster than without this patch.
This commit is contained in:
parent
b73a6cc213
commit
f62d961dfe
5 changed files with 151 additions and 29 deletions
2
test/pdfs/bug857031.pdf.link
Normal file
2
test/pdfs/bug857031.pdf.link
Normal file
|
@ -0,0 +1,2 @@
|
|||
https://bug857031.bmoattachments.org/attachment.cgi?id=732270
|
||||
|
|
@ -6354,5 +6354,13 @@
|
|||
"value": "Hello PDF.js World"
|
||||
}
|
||||
}
|
||||
},
|
||||
{ "id": "bug857031",
|
||||
"file": "pdfs/bug857031.pdf",
|
||||
"md5": "f11ecd7f75675e0cafbc9880c1a586c7",
|
||||
"rounds": 1,
|
||||
"link": true,
|
||||
"lastPage": 1,
|
||||
"type": "eq"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue