Skip to content

Remove few useless beginPaths #19732

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 1 commit into from
Apr 2, 2025

Conversation

calixteman
Copy link
Contributor

@calixteman calixteman commented Mar 28, 2025

The ctx current path is no more changed since we use some Path2D when we want to fill/stroke them.
It makes calling ctx.beginPath useless.

@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @calixteman received. Current queue size: 1

Live output at: http://54.241.84.105:8877/5245ee83af4ab1f/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @calixteman received. Current queue size: 1

Live output at: http://54.193.163.58:8877/39c8643ed45a23a/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/5245ee83af4ab1f/output.txt

Total script time: 29.38 mins

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/39c8643ed45a23a/output.txt

Total script time: 60.00 mins

@calixteman calixteman force-pushed the rm_useless_beginpath branch from 349403d to ed0a3b7 Compare March 28, 2025 21:34
@calixteman
Copy link
Contributor Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/1f4a5ccceef40ee/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/9a8b7bad7a26150/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/9a8b7bad7a26150/output.txt

Total script time: 29.60 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/1f4a5ccceef40ee/output.txt

Total script time: 60.00 mins

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

Just to improve my understanding: Is the reason that beginPath is no longer necessary that we're doing basic drawing with Path2D now, which means that there's no "partial" paths that need to cleared anymore?

Also, does this improve performance in any noticeable way in some (currently slow) PDFs?


r=me, thank you.

@calixteman
Copy link
Contributor Author

Just to improve my understanding: Is the reason that beginPath is no longer necessary that we're doing basic drawing with Path2D now, which means that there's no "partial" paths that need to cleared anymore?

Yep exactly.

Also, does this improve performance in any noticeable way in some (currently slow) PDFs?

As far as I know: no.

r=me, thank you.

The ctx current path is no more changed since we use some Path2D when we want to fill/stroke them.
It makes calling ctx.beginPath useless.
@calixteman calixteman force-pushed the rm_useless_beginpath branch from ed0a3b7 to a35443f Compare April 1, 2025 14:04
@calixteman
Copy link
Contributor Author

/botio browsertest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/3c1cd8867703557/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/66c55864718bd94/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/66c55864718bd94/output.txt

Total script time: 16.57 mins

  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/3c1cd8867703557/output.txt

Total script time: 30.01 mins

  • Regression tests: Passed

@calixteman calixteman merged commit b743737 into mozilla:master Apr 2, 2025
9 checks passed
@calixteman calixteman deleted the rm_useless_beginpath branch April 2, 2025 11:46
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.

4 participants