D8838: Don't request pixmaps twice when opening okular
Albert Astals Cid
noreply at phabricator.kde.org
Thu Nov 16 10:54:31 UTC 2017
aacid created this revision.
Restricted Application added a subscriber: Okular.
Restricted Application added a project: Okular.
REVISION SUMMARY
This is very visible if you open a file that will have partial updates
and you open it quite zoomed in (so that tiled rendering is in place).
There were two problems:
- If we open the file from the command line, we get a few resize events,
in my case around four, so we where requesting different tiles for each of the
four resizes, which resulted in multiple re-renders, which with partial
updates looks bad. We fix that by also starting the delayResizeEventTimer
on resize events even if there's no items on the view yet, this has a
slight delay in rendering but i can't really see it
- When doing tiled rendering we request a bit more than the immediate visible rect,
this is the expandedVisibleRect variable, but the problem is that if this is the
first request that will create the tiles, hasTileManager still returned false, so
we would request that tile, then go back and since we would have tiles, request
a somewhat bigger tile and that would also end up in a repaint. We fix that by
introducing the requestWillCreateTileManager function that lets the
pageview know that even if we have no tile manager yet this particular request
will create one and thus we should also expand the requested tile a bit to not
end up in the previous situation where we requested a similar area twice
REPOSITORY
R223 Okular
BRANCH
do_not_request_twice
REVISION DETAIL
https://phabricator.kde.org/D8838
AFFECTED FILES
core/document.cpp
core/document_p.h
core/generator.cpp
ui/pageview.cpp
To: aacid
Cc: #okular, ngraham, aacid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20171116/4656a594/attachment.html>
More information about the Okular-devel
mailing list