GNOME Bugzilla – Bug 708082
Implement tiled rendering in Evince
Last modified: 2018-05-22 15:18:11 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.
Created attachment 254929 [details] [review] libdocument: add tile and tile_level to EvRenderContext From José's wip/tiling_manager branch, slightly modified
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
Created attachment 254931 [details] [review] libpdf: Implement rendering of selection surfaces for tiles
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
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.
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.
Created attachment 254935 [details] [review] libview: Added support for debugging view_get_visible_pages_tile_array ()
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.
Created attachment 254937 [details] [review] libview: Modify ev_pixbuf_cache_update_range() to use the EvPageVisibleTiles array
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.
Created attachment 254939 [details] [review] libview: Modified ev-pixbuf-cache to use some tiled rendering functions
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.
Created attachment 254941 [details] [review] libview: Updated ev-pixbuf-cache to support selections in tiling Selections are now rendered even in tiling mode.
Created attachment 254942 [details] [review] libview: Modify ev_pixbuf_cache_reload_page() for tiling
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
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.
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.
Review of attachment 254930 [details] [review]: same
Review of attachment 254931 [details] [review]: same
Review of attachment 254932 [details] [review]: argh... we should have a batch patch review ..
Review of attachment 254933 [details] [review]: same
-- 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.