Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-pixbuf-cache.c
diff options
context:
space:
mode:
authorJonathan Blandford <jrb@src.gnome.org>2005-07-30 23:11:25 (GMT)
committer Jonathan Blandford <jrb@src.gnome.org>2005-07-30 23:11:25 (GMT)
commit2f1494f465ee651cb78bdf8f365ad45f33957ba6 (patch)
tree2ec147ce256791a4bc6a1e2d258435d7089ff8fb /shell/ev-pixbuf-cache.c
parent9695105e94d879997669c2e3765ebbafce41f401 (diff)
at Jul 30 19:09:34 2005 Jonathan Blandford <jrb@redhat.com>
* shell/ev-pixbuf-cache.c: (ev_pixbuf_cache_clear): * shell/ev-pixbuf-cache.h: * shell/ev-sidebar-thumbnails.c: (ev_sidebar_thumbnails_get_property), (add_range), (adjustment_changed_cb): * shell/ev-view.c: (ev_view_set_rotation): Fix rotation and the pixbuf cache. Make thumbnailing work again. Also, fix bug where we were thumbnailing the entire docment on startup, slowing us down hugely.
Diffstat (limited to 'shell/ev-pixbuf-cache.c')
-rw-r--r--shell/ev-pixbuf-cache.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/shell/ev-pixbuf-cache.c b/shell/ev-pixbuf-cache.c
index 7ada246..36eca68 100644
--- a/shell/ev-pixbuf-cache.c
+++ b/shell/ev-pixbuf-cache.c
@@ -700,6 +700,24 @@ ev_pixbuf_cache_get_text_mapping (EvPixbufCache *pixbuf_cache,
return job_info->text_mapping;
}
+/* Clears the cache of jobs and pixbufs.
+ */
+void
+ev_pixbuf_cache_clear (EvPixbufCache *pixbuf_cache)
+{
+ int i;
+
+ for (i = 0; i < pixbuf_cache->preload_cache_size; i++) {
+ dispose_cache_job_info (pixbuf_cache->prev_job + i, pixbuf_cache);
+ dispose_cache_job_info (pixbuf_cache->next_job + i, pixbuf_cache);
+ }
+
+ for (i = 0; i < PAGE_CACHE_LEN (pixbuf_cache); i++) {
+ dispose_cache_job_info (pixbuf_cache->job_list + i, pixbuf_cache);
+ }
+}
+
+
GdkPixbuf *
ev_pixbuf_cache_get_selection_pixbuf (EvPixbufCache *pixbuf_cache,
gint page,