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:
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,