Bug 500724

Summary: Cached document render gets pixelated up when display resolution changes
Product: [Applications] okular Reporter: kleines
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: minor CC: fanzhuyifan
Priority: NOR    
Version First Reported In: 24.12.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Exhibition of scale bug; while the UI is scaled correctly, the document text is not.
What the text should look like for comparison (at the same scale)

Description kleines 2025-02-25 13:51:55 UTC
Created attachment 178865 [details]
Exhibition of scale bug; while the UI is scaled correctly, the document text is not.

SUMMARY

When a document is pre-rendered into Okular’s document display cache, and the display resolution changes, the document appears pixelated until a re-render (e.g. by zooming) is enforced.

STEPS TO REPRODUCE
1. Open a document in Okular (any will do, I’ve observed it with many PDFs)
2. Change the display resolution of the screen that Okular is open on (at least temporarily). For instance, this commonly happens automatically under KDE Wayland when the display output turns on again after sleep mode / inactivity on the lock screen. The behavior obviously also occurs with manual display resolution changes, even if the resolution is reset to the old value afterwards.
3. Observe the pixelated document.

OBSERVED RESULT

See attached image. The document is pixelated in a strange way, and this does not go away when moving through the document. It only fixes itself after forcing Okular to re-render the document, such as scrolling to non-cached pages, or zooming in or out.

EXPECTED RESULT

The document should not be pixelated. Okular should probably re-render the document if the resolution (of the window, or the whole screen) changes.

SOFTWARE/OS VERSIONS
Okular: 24.12.1
KDE Frameworks: 6.10.0
Qt: 6.8.1 wird verwendet und gebaut wurde mit 6.8.1
Arch Linux (Wayland)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.12.9-arch1-1

ADDITIONAL INFORMATION
Comment 1 kleines 2025-02-25 13:58:11 UTC
Created attachment 178866 [details]
What the text should look like for comparison (at the same scale)

I hope this makes the issue clearer to see; after reviewing the original screenshot I noticed that it was hard to spot. Viewing the image at 100% resolution (and no more) helps.