mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
[api-minor] Use a SVG filter when rendering pages in HCM
The idea is to apply an overall filter on each page: the main advantage is to have some filtered images which could help to make them visible for some users.
This commit is contained in:
parent
85166c60fd
commit
da080cc26e
5 changed files with 181 additions and 85 deletions
|
@ -3082,7 +3082,7 @@ class WorkerTransport {
|
|||
this.fontLoader.clear();
|
||||
}
|
||||
this.#methodPromises.clear();
|
||||
this.filterFactory.destroy();
|
||||
this.filterFactory.destroy(/* keepHCM = */ true);
|
||||
}
|
||||
|
||||
get loadingParams() {
|
||||
|
@ -3337,7 +3337,7 @@ class InternalRenderTask {
|
|||
cancel(error = null, extraDelay = 0) {
|
||||
this.running = false;
|
||||
this.cancelled = true;
|
||||
this.gfx?.endDrawing();
|
||||
this.gfx?.endDrawing(this.pageColors);
|
||||
|
||||
if (this._canvas) {
|
||||
InternalRenderTask.#canvasInUse.delete(this._canvas);
|
||||
|
@ -3402,7 +3402,7 @@ class InternalRenderTask {
|
|||
if (this.operatorListIdx === this.operatorList.argsArray.length) {
|
||||
this.running = false;
|
||||
if (this.operatorList.lastChunk) {
|
||||
this.gfx.endDrawing();
|
||||
this.gfx.endDrawing(this.pageColors);
|
||||
if (this._canvas) {
|
||||
InternalRenderTask.#canvasInUse.delete(this._canvas);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue