Commit f4a883ea authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert Committed by Albert Astals Cid

Partial fix for high res displays

Summary:
On high res displays we end up using
the tile manager on single pages, that doesn't work
(for reasons that aren't yet clear) - but it
doesn't make sense if we most of the page anyway.

BUG: 401339

Reviewers: #okular, aacid

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D20882
parent 3c5b9b6f
......@@ -1303,6 +1303,7 @@ void DocumentPrivate::sendGeneratorPixmapRequest()
QRect requestRect = r->isTile() ? r->normalizedRect().geometry( r->width(), r->height() ) : QRect( 0, 0, r->width(), r->height() );
TilesManager *tilesManager = r->d->tilesManager();
const double normalizedArea = r->normalizedRect().width() * r->normalizedRect().height();
// If it's a preload but the generator is not threaded no point in trying to preload
if ( r->preload() && !m_generator->hasFeature( Generator::Threaded ) )
......@@ -1328,8 +1329,10 @@ void DocumentPrivate::sendGeneratorPixmapRequest()
m_pixmapRequestsStack.pop_back();
delete r;
}
// If the requested area is above 8000000 pixels, switch on the tile manager
else if ( !tilesManager && m_generator->hasFeature( Generator::TiledRendering ) && (long)r->width() * (long)r->height() > 8000000L )
// If the requested area is above 8000000 pixels, and we're not rendering most of the page, switch on the tile manager
else if ( !tilesManager && m_generator->hasFeature( Generator::TiledRendering ) &&
(long)r->width() * (long)r->height() > 8000000L &&
normalizedArea < 0.75 && normalizedArea != 0 )
{
// if the image is too big. start using tiles
qCDebug(OkularCoreDebug).nospace() << "Start using tiles on page " << r->pageNumber()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment