diff options
author | Vincent Sanders <vince@kyllikki.org> | 2015-04-13 23:19:04 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2015-04-13 23:19:04 +0100 |
commit | f37e52c39475e6efd3740c5ae1ec4f290662928f (patch) | |
tree | 88d01618e903975743a3cb74bff9bf8df54c2a45 /content/urldb.c | |
parent | 7a28131e4953934150967eb7886bc06678e249e8 (diff) | |
download | netsurf-f37e52c39475e6efd3740c5ae1ec4f290662928f.tar.gz netsurf-f37e52c39475e6efd3740c5ae1ec4f290662928f.tar.bz2 |
Move bitmap operations into an operation table.
The generic bitmap handlers provided by each frontend are called back
from the core and therefore should be in an operation table. This was
one of the very few remaining interfaces stopping the core code from
being split into a library.
Diffstat (limited to 'content/urldb.c')
-rw-r--r-- | content/urldb.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/content/urldb.c b/content/urldb.c index f77f597c4..a9476d72a 100644 --- a/content/urldb.c +++ b/content/urldb.c @@ -95,19 +95,20 @@ #include <string.h> #include <strings.h> #include <time.h> - #include <curl/curl.h> -#include "image/bitmap.h" -#include "content/content.h" -#include "content/urldb.h" -#include "desktop/cookie_manager.h" #include "utils/nsoption.h" #include "utils/log.h" #include "utils/corestrings.h" #include "utils/url.h" #include "utils/utils.h" #include "utils/bloom.h" +#include "image/bitmap.h" +#include "desktop/cookie_manager.h" +#include "desktop/gui_internal.h" + +#include "content/content.h" +#include "content/urldb.h" struct cookie_internal_data { char *name; /**< Cookie name */ @@ -2330,8 +2331,9 @@ static void urldb_destroy_path_node_content(struct path_data *node) free(node->fragment[i]); free(node->fragment); - if (node->thumb) - bitmap_destroy(node->thumb); + if (node->thumb) { + guit->bitmap->destroy(node->thumb); + } free(node->urld.title); @@ -3065,8 +3067,9 @@ void urldb_set_thumbnail(nsurl *url, struct bitmap *bitmap) LOG(("Setting bitmap on %s", nsurl_access(url))); - if (p->thumb && p->thumb != bitmap) - bitmap_destroy(p->thumb); + if (p->thumb && p->thumb != bitmap) { + guit->bitmap->destroy(p->thumb); + } p->thumb = bitmap; } |