From e471efa0967586c7a7ab1060572ebcec0b02269f Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 6 Sep 2011 22:01:47 +0000 Subject: make the image_cache cleaner less brain dead svn path=/trunk/netsurf/; revision=12766 --- image/image_cache.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'image/image_cache.h') diff --git a/image/image_cache.h b/image/image_cache.h index c0ccfac90..568f3e951 100644 --- a/image/image_cache.h +++ b/image/image_cache.h @@ -43,8 +43,25 @@ typedef struct bitmap * (image_cache_convert_fn) (struct content *content); -/** Initialise the image cache */ -nserror image_cache_init(void); +struct image_cache_parameters { + /** How frequently the background cache clean process is run (ms) */ + unsigned int bg_clean_time; + + /** The target upper bound for the image cache size */ + size_t limit; + + /** The hysteresis allowed round the target size */ + size_t hysteresis; + + /** The speculative conversion "small" size */ + size_t speculative_small; +}; + +/** Initialise the image cache + * + * @param image_cache_parameters The control parameters for the image cache + */ +nserror image_cache_init(const struct image_cache_parameters *image_cache_parameters); nserror image_cache_fini(void); /** adds an image content to be cached. -- cgit v1.2.3