<table><tr><td style="">aacid created this revision.<br />Restricted Application added a subscriber: Okular.<br />Restricted Application added a project: Okular.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8838" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This is very visible if you open a file that will have partial updates<br />
and you open it quite zoomed in (so that tiled rendering is in place).</p>
<p>There were two problems:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">If we open the file from the command line, we get a few resize events,</li>
</ul>
<p>in my case around four, so we where requesting different tiles for each of the<br />
four resizes, which resulted in multiple re-renders, which with partial<br />
updates looks bad. We fix that by also starting the delayResizeEventTimer<br />
on resize events even if there's no items on the view yet, this has a<br />
slight delay in rendering but i can't really see it</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">When doing tiled rendering we request a bit more than the immediate visible rect,</li>
</ul>
<p>this is the expandedVisibleRect variable, but the problem is that if this is the<br />
first request that will create the tiles, hasTileManager still returned false, so<br />
we would request that tile, then go back and since we would have tiles, request<br />
a somewhat bigger tile and that would also end up in a repaint. We fix that by<br />
introducing the requestWillCreateTileManager function that lets the<br />
pageview know that even if we have no tile manager yet this particular request<br />
will create one and thus we should also expand the requested tile a bit to not<br />
end up in the previous situation where we requested a similar area twice</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R223 Okular</div></div></div><br /><div><strong>BRANCH</strong><div><div>do_not_request_twice</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8838" rel="noreferrer">https://phabricator.kde.org/D8838</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>core/document.cpp<br />
core/document_p.h<br />
core/generator.cpp<br />
ui/pageview.cpp</div></div></div><br /><div><strong>To: </strong>aacid<br /><strong>Cc: </strong>Okular, ngraham, aacid<br /></div>