Commit graph

21 commits

Author SHA1 Message Date
Albert Astals Cid 19d98d6a74 Run clang-format
find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format -i {} \;

If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
2020-07-11 09:17:33 +02:00
Albert Astals Cid 47d7d04b5e delete copy constructor and assignment operator of some internal classes
they are unused(except the PageViewItem one), but if anyone would use
them things would go wrong, so protect us from it

Actually fixes a bug in PageView::slotFitWindowToPage in which we were
copying constructing PageViewItem and that's bad
2019-01-10 00:28:49 +01:00
Yuri Chornoivan 69c7b834d1 Fix minor API docs EBN issues 2018-10-19 09:00:06 +03:00
Albert Astals Cid 2d8b2c7e95 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
2018-02-01 22:53:28 +01:00
Montel Laurent 5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Mailson Menezes 7528fb8c88 Change TilesManager::tilesAt use
- The second parameter has changed to an enum
 - Now Page::tilesAt only returns tiles with pixmaps
2012-11-15 20:41:17 -03:00
Mailson Menezes b762e5f10e Fix issue where the tiles seemed to be deformed while rotating the page
Also, don't mark rotated pixmaps as dirty since we are already updating
them
2012-11-12 13:11:34 -03:00
Fabio D'Urso d3eb739814 Merged TilesManager::setWidth and setHeight into a single setSize method 2012-11-11 21:39:23 +01:00
Fabio D'Urso c460b0cd90 Changed a little documentation in tilesmanager_p.h 2012-11-09 19:48:46 +01:00
Fabio D'Urso 68f8dd73e1 TilesManager doesn't need to be exported and doesn't need a virtual dtor 2012-11-09 19:48:23 +01:00
Fabio D'Urso 437ddad588 Hide tiles manager within okularcore
Only the Tile class (tile.h) is visible from the outside
2012-11-08 20:26:17 -03:00
Fabio D'Urso f2acce05a3 Count used memory using a qulonglong 2012-11-08 19:33:22 +01:00
Mailson Menezes f91f55d117 Split tile structure in Tile and TileNode
The new class TileNode represents a node in the tree structure
whereas Tile is just a data structure to store the pixmap and tile rect
and is used outside tiles manager.
2012-11-08 14:44:57 -03:00
Mailson Menezes da54ffdd8e Improve the evicting algorithm
The miss counter was taken away. Now the algorithm relies on the
distance between the tiles and the viewport.

Also the visibleRect() and setVisibleRect() methods were removed from
TilesManager since we now pass this information to
TilesManager::cleanupPixmapMemory()
2012-11-08 10:58:08 -03:00
Mailson Menezes f798ef22d1 Refactor tiles manager code as suggested by Fabio D'urso 2012-11-08 08:50:33 -03:00
Mailson Menezes a61e1e0834 Fix annotations bug
The annotations created in tiles mode were not shown unless the user
changed the zoom level.
2012-10-25 09:24:11 -03:00
Mailson Menezes ca89ffe96c Avoid making unnecessary requests
Some requests may take a while to process in a highly zoomed region.
Since those requests are not yet finished, other requests to the same
region are likely to be made (specially if the user is scrolling fast)
and the generator will have to render the same region repeatedly.

Also when changing zoom rapidly some pixmaps can arrive at the tiles
manager when another request has already been posted. This pixmap is not
necessary anymore and should be discarded (the tiles manager will get a
new pixmap anyway).
2012-09-24 22:41:57 -03:00
Mailson Menezes 1bfe8610c9 Do not evict visible tiles
Also avoid trying to evict more tiles if the tiles manager is empty (all
tiles were previously removed)
2012-08-20 00:47:33 -03:00
Mailson Menezes d2f236e82f Document Tile and TilesManager 2012-08-19 18:56:54 -03:00
Mailson Menezes d3a0fa057a Split tiles before the request
The splitting was only executed after the pixmap arrived the tiles
manager. That was bad and likely to lead to an unnecessary rendering in
the case of a big tile that would be split after all.

This also fixes a bug where some tiles weren't updated.
2012-08-18 17:31:16 -03:00
Mailson Menezes 851a503e81 Move tiles manager to a private header 2012-08-17 15:23:58 -03:00
Renamed from core/tilesmanager.h (Browse further)