diff options
Diffstat (limited to 'image')
-rw-r--r-- | image/image_cache.c | 11 | ||||
-rw-r--r-- | image/image_cache.h | 2 |
2 files changed, 3 insertions, 10 deletions
diff --git a/image/image_cache.c b/image/image_cache.c index 9a478a605..32fe74571 100644 --- a/image/image_cache.c +++ b/image/image_cache.c @@ -283,7 +283,7 @@ static void image_cache__background_update(void *p) } /* exported interface documented in image_cache.h */ -struct bitmap *image_cache_get_bitmap(struct content *c) +struct bitmap *image_cache_get_bitmap(const struct content *c) { struct image_cache_entry_s *centry; @@ -576,14 +576,7 @@ void image_cache_destroy(struct content *content) void *image_cache_get_internal(const struct content *c, void *context) { - struct image_cache_entry_s *centry; - - centry = image_cache__find(c); - if (centry == NULL) { - return NULL; - } - - return centry->bitmap; + return image_cache_get_bitmap(c); } content_type image_cache_content_type(void) diff --git a/image/image_cache.h b/image/image_cache.h index 568f3e951..e879c740d 100644 --- a/image/image_cache.h +++ b/image/image_cache.h @@ -79,7 +79,7 @@ nserror image_cache_remove(struct content *content); /** Obtain a bitmap from a content converting from source if neccessary. */ -struct bitmap *image_cache_get_bitmap(struct content *c); +struct bitmap *image_cache_get_bitmap(const struct content *c); /** Obtain a bitmap from a content with no conversion */ struct bitmap *image_cache_find_bitmap(struct content *c); |