Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api-minor] Make isOffscreenCanvasSupported configurable via the API (issue 14952) #15542

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Oct 6, 2022

This patch first of all makes isOffscreenCanvasSupported configurable, defaulting to true in browsers and false in Node.js environments, with a new getDocument parameter. While you normally want to use this, in order to improve performance, it should still be possible for users to control it (similar to e.g. isEvalSupported).

The specific problem, as reported in issue #14952, is that the SVG back-end doesn't support the new ImageMask data-format that's introduced in PR #14754. In particular:

  • When the SVG back-end is used in Node.js environments, this patch will "just work" without the user needing to make any code changes.
  • If the SVG back-end is used in browsers, this patch will require that isOffscreenCanvasSupported: false is added to the getDocument-call.

@Snuffleupagus Snuffleupagus linked an issue Oct 6, 2022 that may be closed by this pull request
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2022

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/82b4ad898307e48/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2022

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/50ced6d48abe9a6/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2022

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/82b4ad898307e48/output.txt

Total script time: 25.64 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 6
  different first/second rendering: 2

Image differences available at: http://54.241.84.105:8877/82b4ad898307e48/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Oct 6, 2022

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/50ced6d48abe9a6/output.txt

Total script time: 29.56 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 1

Image differences available at: http://54.193.163.58:8877/50ced6d48abe9a6/reftest-analyzer.html#web=eq.log

…I (issue 14952)

This patch first of all makes `isOffscreenCanvasSupported` configurable, defaulting to `true` in browsers and `false` in Node.js environments, with a new `getDocument` parameter. While you normally want to use this, in order to improve performance, it should still be possible for users to control it (similar to e.g. `isEvalSupported`).

The specific problem, as reported in issue 14952, is that the SVG back-end doesn't support the new ImageMask data-format that's introduced in PR 14754. In particular:
 - When the SVG back-end is used in Node.js environments, this patch will "just work" without the user needing to make any code changes.
 - If the SVG back-end is used in browsers, this patch will require that `isOffscreenCanvasSupported: false` is added to the `getDocument`-call.
Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SVG: TypeError: bytes.subarray is not a function
3 participants