Bug 103372 - Add API to let the renderin process callback in the middle of rendering to get a partial rendering
Summary: Add API to let the renderin process callback in the middle of rendering to ge...
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: qt frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-20 10:27 UTC by Albert Astals Cid
Modified: 2017-11-15 09:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
The said patch (14.72 KB, patch)
2017-10-20 10:27 UTC, Albert Astals Cid
Details | Splinter Review
Updated patch (15.72 KB, patch)
2017-11-02 09:22 UTC, Albert Astals Cid
Details | Splinter Review

Description Albert Astals Cid 2017-10-20 10:27:38 UTC
Created attachment 134935 [details] [review]
The said patch

For very complex map files (that sometimes take minutes to render) it is a good idea (and Adobe Reader does the same) to update the rendered image every X operations so that the user sees the rendering is still happening instead of the program to have hung.

This is already taken into account in the poppler core by the calls to dump() from Gfx.cc.

This patch leverages that and adds new API to the Qt5 frontend to allow for that.

I will add a link to the Okular code that uses it in a bit.

I will also try to find a slow document to share, since the one i've used to develop this feature is sadly private and can't share it.
Comment 1 Albert Astals Cid 2017-10-20 12:27:29 UTC
One PDF that benefits from this is https://scalablemaps.com/download-request/dublin-center-street/pdf (even though this is not very slow it shows the difference)
Comment 2 Albert Astals Cid 2017-10-20 13:08:35 UTC
Okular patch (includes video of the difference) is available at https://phabricator.kde.org/D8379
Comment 3 Albert Astals Cid 2017-11-02 09:22:09 UTC
Created attachment 135205 [details] [review]
Updated patch

introduces typedefs for the function pointers and uses QVariant instead of void * for the payload
Comment 4 Albert Astals Cid 2017-11-14 16:55:49 UTC
I will be pushing this tomorrow unless someone disagrees.
Comment 5 Albert Astals Cid 2017-11-15 09:47:19 UTC
Pushed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.