[okular] [Bug 383943] HiDPI: Rendering glitches near the page boundaries

Oliver Sander bugzilla_noreply at kde.org
Mon Jul 1 13:16:02 BST 2019


https://bugs.kde.org/show_bug.cgi?id=383943

Oliver Sander <oliver.sander at tu-dresden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/kde/ |https://invent.kde.org/kde/
                   |okular/commit/c73de7e6a1937 |okular/commit/dec6923c56a99
                   |05de2ae06772d799eadfec9842f |dc7bdf59c890c0ee310fb12fc23

--- Comment #4 from Oliver Sander <oliver.sander at tu-dresden.de> ---
Git commit dec6923c56a99dc7bdf59c890c0ee310fb12fc23 by Oliver Sander.
Committed on 01/07/2019 at 12:12.
Pushed by sander into branch 'fix-bug-383943-hidpi-glitches'.

Make page boundary rendering more robust

Okular renders a simple 'shadow' at the right and the bottom of each
page.  The code for this is a bit fragile:  After the page is rendered,
Okular paints a black outline, and then the shadow.  The shadow is
a hand-implemented gradient, painted line by line.  Finally, the
remaining area is painted in the background color.  No pixel is
ever touched twice.  Unfortunately, the code is buggy, and in hidpi /
fractional scaling situations, some pixels are never touched.
This results in rendering glitches as reported in

  https://bugs.kde.org/show_bug.cgi?id=383943

Instead of trying to fix the previous approach, this patch makes the
code more robust by changing the order of the painting operations.
After painting the page, the code now first paints the background,
which is now enlarged to cover everything off the page.  Finally,
the black outline and shadow are drawn on the previously drawn
background.  This makes sures that no pixel is ever left uninitialized.
It also allows to simplify the shadow drawing operation a bit.

M  +41   -28   ui/pageview.cpp

https://invent.kde.org/kde/okular/commit/dec6923c56a99dc7bdf59c890c0ee310fb12fc23

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list