This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Bookshelf view and Tiling Support for Evince

Link to Proposal : Add Bookshelf View & Tiling support to Evince
Blog : GSoC 2013 - A random desi coder's (ir)regular ramblings
Repository : Gitorious repo for GSoC 2013 work on Evince
Mentor : José Aliste
Me : Aakash Goenka

1.0.1. Project Update: 21st September, 2013

1.0.1.1. Description of Tiled Rendering

The most current implementation of tiled rendering can be found in the 'tiling_clean' branch on my GSoC Gitorious repo. Patches can also be applied from Bug 708082 which I have opened mainly to help in reviewing and integrating the code.

Before I go onto describe how tiling has been implemented, lets keep in mind why we want it:

Now, some constraints which we have due to the way Poppler works:

A page is divided into tiles only if its area goes beyond a certain threshold (MAX_TILE_SIZE).

https://dl.dropboxusercontent.com/u/14970473/illustration1.gif

As you can see in the above illustration, we keep increasing the tile_level in powers of 2 till the individual tiles' area become less than MAX_TILE_SIZE. Now, note that to identify a particular tile, we just need its top left coordinates (in terms of the tile number), page number and tile_level.

As an example, lets take the following situation.

https://dl.dropboxusercontent.com/u/14970473/illustration4.png

Here, 6 particular tiles are in the view port. Now, to describe the visible tiles of a page, we use a EvPageVisibleTiles structure, which is explained in the above illustration. As we can see, the EvPageVisibleTiles structure is a really efficient way to denote which tiles of the page are visible. It is of constant size, regardless of how many tiles of the page are visible.

Now, let's go module-by-module, to see what modifications have been made, to do the rendering of tiles as described above.

1.0.1.1.1. libdocument

1.0.1.1.2. libpdf

1.0.1.1.3. libview: ev-jobs

1.0.1.1.4. libview: ev-view

1.0.1.1.5. libview: ev-pixbuf-cache

Since the work here was very complex, I broke it up into steps, and proceeded the following way-


To conclude, let's see what remains, before the work is good enough for release-
1. Managing of the tile cache, ie., preloading of tiles, and clearing old ones - Some progress has been made in this, in the "tiling_clean_experimental" branch of my Gitorious repo. However, it isn't fully functional yet.
2. Have some way of deciding the MAX_TILE_SIZE, possibly based on screen size.
3. Update the policy which decides the maximum allowed zoom level, now that tiling is enabled.
4. Presently, tiling support has only been added to libpdf backend. So, there needs to be some mechanism to turn off tiling for documents where the backend doesn't support tiling yet.

Some performance improvements can be brought around by-

Apart from the specific project work, I managed to get my hands dirty with some bugs :) -

1.0.2. Project Update: 26th July, 2013

https://dl.dropboxusercontent.com/u/14970473/bookshelf_screenshot_3.png

While in the bookshelf/recent view, the toolbar is quite different from the regular one. There are just 3 buttons
1. Open a document using a file chooser dialog
2. Display 'About' dialog
3. Close the application

To open any recent document from the view, just click on it. It opens in the same window, in place of the bookshelf, and the toolbar changes to the regular one.

https://dl.dropboxusercontent.com/u/14970473/bookshelf_screenshot_4.png

Now, you might notice the new button on the top left. This button allows you to go back to the recent view without closing the current document. So, while reading a document, if you want to open another recently accessed document, you just need to click on this button. Then, once you're back to the bookshelf view, you can click on any other document you want to open and it will open in a new window. To go back to the document you were reading, just click on its icon.

Patches for this and the discussion can be found on Bugzilla - Bug 633501. Latest code is in the 'bookshelf' branch on the Gitorious repo I have made.

User interface improvements that remain (in order of priority)

Improvements to make in the implementation


2024-10-23 11:28