summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2015-04-13 23:19:04 +0100
committerVincent Sanders <vince@kyllikki.org>2015-04-13 23:19:04 +0100
commitf37e52c39475e6efd3740c5ae1ec4f290662928f (patch)
tree88d01618e903975743a3cb74bff9bf8df54c2a45 /content
parent7a28131e4953934150967eb7886bc06678e249e8 (diff)
downloadnetsurf-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')
-rw-r--r--content/content.c3
-rw-r--r--content/urldb.c21
2 files changed, 14 insertions, 10 deletions
diff --git a/content/content.c b/content/content.c
index a27647bd3..a6ca97817 100644
--- a/content/content.c
+++ b/content/content.c
@@ -34,6 +34,7 @@
#include "content/hlcache.h"
#include "image/bitmap.h"
#include "desktop/browser.h"
+#include "desktop/gui_internal.h"
#include "utils/nsoption.h"
#include "utils/http.h"
@@ -1243,7 +1244,7 @@ bool content__get_opaque(struct content *c)
struct bitmap *bitmap = NULL;
bitmap = c->handler->get_internal(c, NULL);
if (bitmap != NULL) {
- opaque = bitmap_get_opaque(bitmap);
+ opaque = guit->bitmap->get_opaque(bitmap);
}
}
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;
}