Skip to content

slideshow: improve slideshow sharpness#15646

Closed
lpranam wants to merge 1 commit intoCollaboraOnline:mainfrom
lpranam:crisp_slideshow
Closed

slideshow: improve slideshow sharpness#15646
lpranam wants to merge 1 commit intoCollaboraOnline:mainfrom
lpranam:crisp_slideshow

Conversation

@lpranam
Copy link
Copy Markdown
Member

@lpranam lpranam commented Apr 23, 2026

Use device pixel ratio when selecting the resolution tier so the
offscreen canvas matches the display's physical pixels on HiDPI
screens. Switch layer texture filtering to NEAREST to preserve
pixel-exact rendering, and use Math.ceil for the width computation
in computeLayerSize so the client-server dimensions agree and no
row duplication artifact appears.

For example, a standard 16:9 Impress page (25400x14288 twips) at
the 3840x2160 tier: Math.trunc(2160 * 25400/14288) = 3839, which
causes a 1-pixel height mismatch with the server (2159 vs 2160),
producing a visible tear. Math.ceil gives 3840, so the server
derives trunc(3840 * 14288/25400) = 2160 — an exact match.

  • Target version: main

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

Comment thread browser/src/slideshow/LayerDrawing.ts
@lpranam lpranam changed the title slideshow: use 2D compositor for offscreen slide layer assembly slideshow: fix sharpness by using DPR-aware resolution and NEAREST filtering Apr 24, 2026
@lpranam lpranam changed the title slideshow: fix sharpness by using DPR-aware resolution and NEAREST filtering slideshow: improve slideshow sharpness Apr 24, 2026
@github-project-automation github-project-automation Bot moved this from To Review to To Test in Collabora Online Apr 24, 2026
@caolanm
Copy link
Copy Markdown
Contributor

caolanm commented Apr 24, 2026

Looks good in principle I think, but screenshots need to be updated I bet to get cypress tests to pass

Use device pixel ratio when selecting the resolution tier so the
offscreen canvas matches the display's physical pixels on HiDPI
screens. Switch layer texture filtering to NEAREST to preserve
pixel-exact rendering, and use Math.ceil for the width computation
in computeLayerSize so the client-server dimensions agree and no
row duplication artifact appears.

For example, a standard 16:9 Impress page (25400x14288 twips) at
the 3840x2160 tier: Math.trunc(2160 * 25400/14288) = 3839, which
causes a 1-pixel height mismatch with the server (2159 vs 2160),
producing a visible tear. Math.ceil gives 3840, so the server
derives trunc(3840 * 14288/25400) = 2160 — an exact match.

test screenshots updated to sharper shots
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I6902f39677b626df8a7da2f54fefb30c1cc7faf0
@lpranam
Copy link
Copy Markdown
Member Author

lpranam commented Apr 25, 2026

@lpranam lpranam closed this Apr 25, 2026
@github-project-automation github-project-automation Bot moved this from To Test to Done in Collabora Online Apr 25, 2026
@lpranam lpranam deleted the crisp_slideshow branch April 25, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants