diff options
-rw-r--r-- | libview/ev-pixbuf-cache.c | 2 | ||||
-rw-r--r-- | libview/ev-view.c | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c index 3f226041..1b158265 100644 --- a/libview/ev-pixbuf-cache.c +++ b/libview/ev-pixbuf-cache.c @@ -101,7 +101,7 @@ static gboolean new_selection_surface_needed(EvPixbufCache *pixbuf_cac #define PAGE_CACHE_LEN(pixbuf_cache) \ (pixbuf_cache->start_page>=0?((pixbuf_cache->end_page - pixbuf_cache->start_page) + 1):0) -#define MAX_PRELOADED_PAGES 20 +#define MAX_PRELOADED_PAGES 3 G_DEFINE_TYPE (EvPixbufCache, ev_pixbuf_cache, G_TYPE_OBJECT) diff --git a/libview/ev-view.c b/libview/ev-view.c index e3029305..a195ba21 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -788,13 +788,12 @@ view_update_range_and_current_page (EvView *view) ev_view_check_cursor_blink (view); } - #define PAGE_CACHE_NUMBER 10 ev_page_cache_set_page_range (view->page_cache, - MAX(view->start_page - PAGE_CACHE_NUMBER, 0), - MIN(view->end_page + PAGE_CACHE_NUMBER, ev_document_get_n_pages (view->document) - 1)); + view->start_page, + view->end_page); ev_pixbuf_cache_set_page_range (view->pixbuf_cache, - MAX(view->start_page - PAGE_CACHE_NUMBER, 0), - MIN(view->end_page + PAGE_CACHE_NUMBER, ev_document_get_n_pages (view->document) - 1), + view->start_page, + view->end_page, view->selection_info.selections); if (view->accessible) ev_view_accessible_set_page_range (EV_VIEW_ACCESSIBLE (view->accessible), |