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 /desktop/browser_history.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 'desktop/browser_history.c')
-rw-r--r-- | desktop/browser_history.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/desktop/browser_history.c b/desktop/browser_history.c index 1991bf9a1..e7fd87583 100644 --- a/desktop/browser_history.c +++ b/desktop/browser_history.c @@ -37,6 +37,7 @@ #include "css/css.h" #include "image/bitmap.h" +#include "desktop/gui_internal.h" #include "desktop/browser_history.h" #include "desktop/browser_private.h" #include "desktop/plotters.h" @@ -511,9 +512,9 @@ nserror browser_window_history_add(struct browser_window *bw, bitmap = urldb_get_thumbnail(nsurl); if (bitmap == NULL) { LOG(("Creating thumbnail for %s", nsurl_access(nsurl))); - bitmap = bitmap_create(WIDTH, HEIGHT, - BITMAP_NEW | BITMAP_CLEAR_MEMORY | - BITMAP_OPAQUE); + bitmap = guit->bitmap->create(WIDTH, HEIGHT, + BITMAP_NEW | BITMAP_CLEAR_MEMORY | + BITMAP_OPAQUE); if (bitmap != NULL) { if (thumbnail_create(content, bitmap)) { /* Successful thumbnail so register it @@ -525,7 +526,7 @@ nserror browser_window_history_add(struct browser_window *bw, * silently but clean up bitmap. */ LOG(("Thumbnail bitmap creation failed")); - bitmap_destroy(bitmap); + guit->bitmap->destroy(bitmap); bitmap = NULL; } } |