[okular] [Bug 418086] Okular starts over rendering preview of page when scrolling

Albert Astals Cid bugzilla_noreply at kde.org
Mon Mar 2 21:20:42 GMT 2020


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

Albert Astals Cid <aacid at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|CONFIRMED                   |RESOLVED
      Latest Commit|                            |https://invent.kde.org/kde/
                   |                            |okular/commit/81c005710cdbb
                   |                            |23f9ed9ebcc4aee4db69d33434d

--- Comment #9 from Albert Astals Cid <aacid at kde.org> ---
Git commit 81c005710cdbb23f9ed9ebcc4aee4db69d33434d by Albert Astals Cid.
Committed on 02/03/2020 at 21:06.
Pushed by aacid into branch 'release/19.12'.

Fix re-rendering of images when using partial updates

Partial updates trigger when the page is taking "too much" to render (>
500 ms).

When this happens we store a pixmap for the page, this meant that
Page::hasPixmap returned true, so when moving the viewport around we
would think that that page was already rendered, and thus needed no
rendering so we didn't add it to the list of requested pixmaps.

Then on document when seeing the new list of requested pixmaps we would
go and check and say "oh there's one request going on that we don't want
anymore, let's cancel it", so we would cancel the page that we actually
wanted (and clear the partial pixmap)

Then on the next scroll we would realize we did not have that page
pixmap and then request it again which since it's the current page would
immediately stop all other renders and start this one.

Then we would get a temporary pixmap and the loop of cancellations and
requesting again would keep happening as long as the user moved the
viewport.

We fix that my making hasPixmap return false if the pixmap we have is a
partial one, because that's what the function meant "forever" until we
recently introduced partial updates so all the calls to hasPixmap
actually mean "hasNonPartialPixmap"

M  +6    -0    core/page.cpp
M  +2    -1    core/page.h
M  +1    -0    core/page_p.h

https://invent.kde.org/kde/okular/commit/81c005710cdbb23f9ed9ebcc4aee4db69d33434d

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


More information about the Okular-devel mailing list