Add support for cancellable image rendering and text extraction

Authored by aacid on Feb 1 2018, 6:42 PM.

Description

Add support for cancellable image rendering and text extraction

Summary:
Only supported by the pdf backend if using poppler >= 0.63

Sadly had to change the generator API

Text cancellation is a bit wobbly still since poppler has large parts
of the code where doesn't check for the cancellation flag, but that
is something that will get automagically fixed for us if the poppler
side is improved

Test Plan: Needs https://bugs.freedesktop.org/show_bug.cgi?id=104263

Reviewers: ervin, rkflx

Reviewed By: ervin, rkflx

Subscribers: Okular

Tags: Okular

Differential Revision: https://phabricator.kde.org/D9328

Details

aheinecke added inline comments.
/core/document.cpp
1534

I think that this line introduced a regression when using refreshPixmaps without a tilesManager. It no longer refreshed anything.
That is the reason why refreshPixmaps did not work for me in D10048

Ok to push?:

diff --git a/core/document.cpp b/core/document.cpp
index 8db23b3e4..070c95f8d 100644
--- a/core/document.cpp
+++ b/core/document.cpp
@@ -1531,7 +1531,7 @@ void DocumentPrivate::refreshPixmaps( int pageNumber )
     for ( PixmapRequest *pr : qAsConst( pixmapsToRequest ) )
     {
         QLinkedList< Okular::PixmapRequest * > requestedPixmaps;
-        pixmapsToRequest.push_back( pr );
+        requestedPixmaps.push_back( pr );
         m_parent->requestPixmaps( requestedPixmaps, Okular::Document::NoOption );
     }
aacid added a comment.Feb 9 2018, 11:37 PM

ouch, i commited the fix, thanks for spotting