Skip to content

Remove the remaining closure in the src/display/canvas.js file #13792

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

Merged
merged 2 commits into from
Jul 25, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jul 25, 2021

For e.g. the gulp mozcentral command, the built pdf.js file decreases from 304 607 to 301 295 bytes with this patch. The improvement comes mostly from having less overall indentation in the code.

Much easier reviewing with https://github.com/mozilla/pdf.js/pull/13792/files?w=1

For e.g. the `gulp mozcentral` command, the *built* `pdf.js` file decreases from `304 607` to `301 295` bytes with this patch. The improvement comes mostly from having less overall indentation in the code.
@Snuffleupagus Snuffleupagus force-pushed the rm-canvas-closure branch 2 times, most recently from 85b1d32 to 8bef790 Compare July 25, 2021 11:26
…ethod-names on the `CanvasGraphics.prototype`

There's no good reason, as far as I can tell, to explicitly define a bunch of methods to be `undefined`, which the current unconditional "copying" of methods will do.
Note that of the `OPS` ~23 percent don't, for various reasons, have an associated method on the `CanvasGraphics.prototype`.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/43a041db2deb249/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/610ebc4559fe5eb/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/43a041db2deb249/output.txt

Total script time: 32.79 mins

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

Image differences available at: http://54.67.70.0:8877/43a041db2deb249/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/610ebc4559fe5eb/output.txt

Total script time: 37.36 mins

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

Image differences available at: http://3.101.106.178:8877/610ebc4559fe5eb/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 777d890 into mozilla:master Jul 25, 2021
@timvandermeij
Copy link
Contributor

Nice clean-up!

@Snuffleupagus Snuffleupagus deleted the rm-canvas-closure branch July 25, 2021 12:55
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.

3 participants