mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Improve performance of reused patterns.
Bug 1721218 has a shading pattern that was used thousands of times. To improve performance of this PDF: - add a cache for patterns in the evaluator and only send the IR form once to the main thread (this also makes caching in canvas easier) - cache the created canvas radial/axial patterns - for shading fill radial/axial use the pattern directly instead of creating temporary canvas
This commit is contained in:
parent
2cf90cd9ad
commit
da1af02ac8
7 changed files with 121 additions and 59 deletions
|
@ -2707,6 +2707,9 @@ class WorkerTransport {
|
|||
pageProxy.cleanupAfterRender = true;
|
||||
}
|
||||
break;
|
||||
case "Pattern":
|
||||
pageProxy.objs.resolve(id, imageData);
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Got unknown object type ${type}`);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue