Skip to content

Move OutputScale to its own file, and always provide the pixelRatio to the CanvasGraphics class - #22561

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:OutputScale-mv
Nov 19, 2026
Merged

timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:OutputScale-mv

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

This way we avoid having to bundle the OutputScale class in the renderer-worker, since it cannot meaningfully be used there anyway (note PR #22120).

Note: This reduces the size of the gulp mozcentral bundle by 476 bytes, which isn't a lot but still cannot hurt.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Reference tests

Results for c55722d (run, references from mozilla/pdf.js.refs@b8f2971334).

Platform Status Tests Total runtime Errors Different FBF No reference Report
Linux ✅ 1427 12m 54s 0 0 0 0
Windows ✅ 1427 15m 9s 0 0 0 0

The report is kept for 30 days and replaced by the next run.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Viewer preview

🗑️ Viewer previews removed.

sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Nov 19, 2026
@codecov-commenter

codecov-commenter commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.87%. Comparing base (22d5507) to head (9271d50).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #22561      +/-   ##
==========================================
- Coverage   90.87%   90.87%   -0.01%     
==========================================
  Files         279      280       +1     
  Lines       69842    69840       -2     
==========================================
- Hits        63472    63465       -7     
- Misses       6370     6375       +5     
Flag Coverage Δ
browsertest 66.17% <4.00%> (+0.01%) ⬆️
fonttest 9.26% <ø> (ø)
integrationtest 71.38% <100.00%> (-0.01%) ⬇️
unittest 64.35% <4.00%> (+<0.01%) ⬆️
unittestcli 62.04% <4.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed

codspeed Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 11.81%

⚡ 1 improved benchmark
✅ 87 untouched benchmarks
⏩ 174 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ XFAFactory.getRichTextAsHtml (issue13447.pdf) 2.1 ms 1.9 ms +11.81%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Snuffleupagus:OutputScale-mv (9271d50) with master (22d5507)

Open in CodSpeed

Footnotes

  1. 174 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

…o` to the `CanvasGraphics` class

This way we avoid having to bundle the `OutputScale` class in the renderer-worker, since it cannot meaningfully be used there anyway (note PR 22120).

*Note:* This reduces the size of the `gulp mozcentral` bundle by `476` bytes, which isn't a lot but still cannot hurt.
sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Nov 19, 2026
sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Nov 19, 2026
@timvandermeij
timvandermeij merged commit 81b2255 into mozilla:master Nov 19, 2026
23 of 24 checks passed
@timvandermeij

Copy link
Copy Markdown
Collaborator

Looks good; thank you!

sync-pdfs-for-pdf-js Bot pushed a commit to mozilla/pdf.js.refs that referenced this pull request Nov 19, 2026
@Snuffleupagus
Snuffleupagus deleted the OutputScale-mv branch November 19, 2026 21:08
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