After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 708082 - Implement tiled rendering in Evince
Implement tiled rendering in Evince
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
3.9.x
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-14 18:17 UTC by aakash
Modified: 2018-05-22 15:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libdocument: add tile and tile_level to EvRenderContext (2.01 KB, patch)
2013-09-14 18:19 UTC, aakash
rejected Details | Review
pdf: Implement Rendering of tiles with new data from EvRenderContext (2.29 KB, patch)
2013-09-14 18:19 UTC, aakash
needs-work Details | Review
libpdf: Implement rendering of selection surfaces for tiles (1.96 KB, patch)
2013-09-14 18:19 UTC, aakash
needs-work Details | Review
libview: Add ev_job_render_new_tile to render tiles async (3.25 KB, patch)
2013-09-14 18:19 UTC, aakash
needs-work Details | Review
libview: Added a structure and some functions for supporting tiling (7.04 KB, patch)
2013-09-14 18:19 UTC, aakash
needs-work Details | Review
libview: Added a function which generates an array of EvPageVisibleTiles (3.91 KB, patch)
2013-09-14 18:19 UTC, aakash
none Details | Review
libview: Added support for debugging view_get_visible_pages_tile_array () (3.81 KB, patch)
2013-09-14 18:19 UTC, aakash
none Details | Review
libview: Made the key of pixbuf-cache hash table a bit more complex (15.35 KB, patch)
2013-09-14 18:20 UTC, aakash
none Details | Review
libview: Modify ev_pixbuf_cache_update_range() to use the EvPageVisibleTiles array (6.83 KB, patch)
2013-09-14 18:20 UTC, aakash
none Details | Review
libview: Added a convenience function for calculating a tile's dimensions (2.93 KB, patch)
2013-09-14 18:20 UTC, aakash
none Details | Review
libview: Modified ev-pixbuf-cache to use some tiled rendering functions (2.78 KB, patch)
2013-09-14 18:20 UTC, aakash
none Details | Review
libview: Made modifications to switch to tiled rendering (10.08 KB, patch)
2013-09-14 18:20 UTC, aakash
none Details | Review
libview: Updated ev-pixbuf-cache to support selections in tiling (5.51 KB, patch)
2013-09-14 18:20 UTC, aakash
none Details | Review
libview: Modify ev_pixbuf_cache_reload_page() for tiling (2.06 KB, patch)
2013-09-14 18:20 UTC, aakash
none Details | Review
libview: Make the PixbufCache to use a GHashTable internally (25.51 KB, patch)
2013-09-14 18:24 UTC, aakash
none Details | Review

Description aakash 2013-09-14 18:17:35 UTC
This bug is specifically for aiding in review and integration of the work I have done for supporting tiled rendering in Evince.

Some of the known issues right now - 
-> Unclear policy for preloading
-> Need to update rule for setting the max zoom level
-> Tiling support has been added only for PDFs. So, need to disable tiling for others, else they will be displayed incorrectly
-> Keep a better way to decide MAX_TILE_SIZE. Maybe something based on screen size, scale and so on.
Comment 1 aakash 2013-09-14 18:19:18 UTC
Created attachment 254929 [details] [review]
libdocument: add tile and tile_level to EvRenderContext

From José's wip/tiling_manager branch, slightly modified
Comment 2 aakash 2013-09-14 18:19:24 UTC
Created attachment 254930 [details] [review]
pdf: Implement Rendering of tiles with new data from EvRenderContext

EvRenderContext now has x,y and tile_level. tile_level is
the the number of divisions (both horizontal and vertical) into
which a page is divided.

From José's wip/tiling_manager branch, slightly modified
Comment 3 aakash 2013-09-14 18:19:30 UTC
Created attachment 254931 [details] [review]
libpdf: Implement rendering of selection surfaces for tiles
Comment 4 aakash 2013-09-14 18:19:38 UTC
Created attachment 254932 [details] [review]
libview: Add ev_job_render_new_tile to render tiles async

From José's wip/tiling_manager branch, slightly modified
Comment 5 aakash 2013-09-14 18:19:45 UTC
Created attachment 254933 [details] [review]
libview: Added a structure and some functions for supporting tiling

+ struct EvPageVisibleTiles: to describe which tiles of a page are
visible.
+ view_calculate_tile_level(): to calculate no of tiles a page should
be divided.
+ view_calculate_page_visible_tiles (): to calculate which tiles of a
page are currently in view.
Comment 6 aakash 2013-09-14 18:19:51 UTC
Created attachment 254934 [details] [review]
libview: Added a function which generates an array of EvPageVisibleTiles

+ view_get_visible_pages_tile_array (): Generates an array of EvPageVisibleTiles,
with one entry for each visible page to describe which tiles are visible.
Comment 7 aakash 2013-09-14 18:19:58 UTC
Created attachment 254935 [details] [review]
libview: Added support for debugging view_get_visible_pages_tile_array ()
Comment 8 aakash 2013-09-14 18:20:07 UTC
Created attachment 254936 [details] [review]
libview: Made the key of pixbuf-cache hash table a bit more complex

+ JobInfoKey: Now used as key for the jobs hash table. It is composed of
the page number, (x,y) tile coordinate, and tile_level.
Comment 9 aakash 2013-09-14 18:20:13 UTC
Created attachment 254937 [details] [review]
libview: Modify ev_pixbuf_cache_update_range() to use the EvPageVisibleTiles array
Comment 10 aakash 2013-09-14 18:20:20 UTC
Created attachment 254938 [details] [review]
libview: Added a convenience function for calculating a tile's dimensions

+ _get_size_for_page_tile (): Gives the exact width and height of a tile (x,y)
for the given page at the specified rotation and scale.
Comment 11 aakash 2013-09-14 18:20:28 UTC
Created attachment 254939 [details] [review]
libview: Modified ev-pixbuf-cache to use some tiled rendering functions
Comment 12 aakash 2013-09-14 18:20:36 UTC
Created attachment 254940 [details] [review]
libview: Made modifications to switch to tiled rendering

+ draw_one_page (): Refactored to draw tiles
+ ev_pixbuf_cache_update_range (): Now adds jobs for tiles instead
of pages.

This, and all previous commits are compilable. The following remain:
-> ev_pixbuf_cache_reload_page () needs to be modifed for tiling
-> selections are not supported in this commit
-> Specify policies for preloading, setting of max zoom level, max_tile_size,
computation of tile level for a page.
Comment 13 aakash 2013-09-14 18:20:43 UTC
Created attachment 254941 [details] [review]
libview: Updated ev-pixbuf-cache to support selections in tiling

Selections are now rendered even in tiling mode.
Comment 14 aakash 2013-09-14 18:20:51 UTC
Created attachment 254942 [details] [review]
libview: Modify ev_pixbuf_cache_reload_page() for tiling
Comment 15 aakash 2013-09-14 18:24:20 UTC
Created attachment 254943 [details] [review]
libview: Make the PixbufCache to use a GHashTable internally

Using a HashTable instead of CacheJobInfo arrays allows for more
flexibility, and eventually, by changing the key hash function,
it will ease the implementation of Tile Rendering.

From José's wip/tiling_manager branch, slightly modified
Comment 16 aakash 2013-09-14 18:28:21 UTC
The last patch "libview: Make the PixbufCache to use a GHashTable internally", is actually supposed to be the first. Sorry for the mistake!

I missed it because I was under the impression that

>git-bz attach 708082 3daccdf..b6b2a4370e2

would be inclusive, and also attach 3daccdf.
Comment 17 José Aliste 2015-06-06 13:57:46 UTC
Review of attachment 254929 [details] [review]:

The patch set works more or less but there is a problem when dealing with different scales.... The tile_level is not correctly handled and we end with tiles with small tile_level at high scales. Hence, we get huge memory usage :(. I am working to fix the pixbuf-cache so we get the improved memory tiling should give us.
Comment 18 José Aliste 2015-06-06 13:58:30 UTC
Review of attachment 254930 [details] [review]:

same
Comment 19 José Aliste 2015-06-06 13:58:46 UTC
Review of attachment 254931 [details] [review]:

same
Comment 20 José Aliste 2015-06-06 13:59:10 UTC
Review of attachment 254932 [details] [review]:

argh... we should have a batch patch review ..
Comment 21 José Aliste 2015-06-06 13:59:30 UTC
Review of attachment 254933 [details] [review]:

same
Comment 22 GNOME Infrastructure Team 2018-05-22 15:18:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/394.