diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-30 15:48:07 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2011-06-30 15:48:07 +0000 |
commit | eddae6af0663243a2677674d501f9a87d55798f5 (patch) | |
tree | 08562171f870a6b592d624adfbfd0d6fa11fcdcb /desktop/thumbnail.c | |
parent | a5dc6b9e6637c85d18510ac6446ee4a8a7955e7b (diff) | |
download | netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.gz netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.bz2 |
Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
Diffstat (limited to 'desktop/thumbnail.c')
-rw-r--r-- | desktop/thumbnail.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/desktop/thumbnail.c b/desktop/thumbnail.c index 6f5fd0318..b88065adb 100644 --- a/desktop/thumbnail.c +++ b/desktop/thumbnail.c @@ -57,8 +57,9 @@ static float thumbnail_get_redraw_scale(struct hlcache_handle *content, /* exported interface, documented in thumbnail.h */ bool thumbnail_redraw(struct hlcache_handle *content, - int width, int height) + int width, int height, const struct redraw_context *ctx) { + struct redraw_context new_ctx = *ctx; struct rect clip; struct content_redraw_data data; float scale; @@ -66,8 +67,8 @@ bool thumbnail_redraw(struct hlcache_handle *content, assert(content); - if (plot.option_knockout) - knockout_plot_start(&plot); + if (ctx->plot->option_knockout) + knockout_plot_start(ctx, &new_ctx); /* No selection */ current_redraw_browser = NULL; @@ -78,10 +79,10 @@ bool thumbnail_redraw(struct hlcache_handle *content, clip.x1 = width; clip.y1 = height; - plot.clip(&clip); + new_ctx.plot->clip(&clip); /* Plot white background */ - plot_ok &= plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1, + plot_ok &= new_ctx.plot->rectangle(clip.x0, clip.y0, clip.x1, clip.y1, plot_style_fill_white); /* Find the scale we're using */ @@ -99,9 +100,9 @@ bool thumbnail_redraw(struct hlcache_handle *content, data.repeat_y = false; /* Render the content */ - plot_ok &= content_redraw(content, &data, &clip); + plot_ok &= content_redraw(content, &data, &clip, &new_ctx); - if (plot.option_knockout) + if (ctx->plot->option_knockout) knockout_plot_end(); return plot_ok; |