diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2010-04-07 18:01:29 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2010-04-07 18:01:29 +0000 |
commit | b9e32a975066b0dfbc89ec0bd4e05b2cdd872696 (patch) | |
tree | 2c10052b45a6f8697a901984faf68489e27a8023 | |
parent | 61fd8d1240399e7c7e12f3120a700a997528c4ae (diff) | |
download | netsurf-b9e32a975066b0dfbc89ec0bd4e05b2cdd872696.tar.gz netsurf-b9e32a975066b0dfbc89ec0bd4e05b2cdd872696.tar.bz2 |
Fix for new cache.
svn path=/trunk/netsurf/; revision=10285
-rw-r--r-- | riscos/thumbnail.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/riscos/thumbnail.c b/riscos/thumbnail.c index 2fb5212e3..82b885bfe 100644 --- a/riscos/thumbnail.c +++ b/riscos/thumbnail.c @@ -32,6 +32,7 @@ #include "oslib/osfile.h" #include "oslib/osspriteop.h" #include "content/content.h" +#include "content/hlcache.h" #include "content/urldb.h" #include "desktop/plotters.h" #include "image/bitmap.h" @@ -77,7 +78,7 @@ static void thumbnail_restore_output(struct thumbnail_save_area *save_area); * \param bitmap the bitmap to draw to * \param url the URL the thumbnail belongs to, or NULL */ -bool thumbnail_create(struct content *content, struct bitmap *bitmap, +bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap, const char *url) { float scale = 1.0; @@ -112,8 +113,9 @@ bool thumbnail_create(struct content *content, struct bitmap *bitmap, plot = ro_plotters; ro_plot_origin_x = 0; ro_plot_origin_y = bitmap->height * 2; - if (content->width) - scale = (float)bitmap->width / (float)content->width; + if (content_get_width(content)) + scale = (float)bitmap->width / + (float)content_get_width(content); ro_plot_set_scale(scale); current_redraw_browser = NULL; /* no selection */ |