summaryrefslogtreecommitdiff
path: root/desktop/thumbnail.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-02-21 14:48:55 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-02-21 14:48:55 +0000
commitcd40c260b9cecbe9d658a00e231aa4d82734e22d (patch)
treec32114f6cad7f296e96fdd23ed35d3ea30606873 /desktop/thumbnail.c
parent1b5d9f07c8877121ecaa1391857ee6f130cb6205 (diff)
downloadnetsurf-cd40c260b9cecbe9d658a00e231aa4d82734e22d.tar.gz
netsurf-cd40c260b9cecbe9d658a00e231aa4d82734e22d.tar.bz2
Remove knockout from html_redraw, and use it in browser_window_redraw and thumbnail_redraw.
svn path=/trunk/netsurf/; revision=11746
Diffstat (limited to 'desktop/thumbnail.c')
-rw-r--r--desktop/thumbnail.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/desktop/thumbnail.c b/desktop/thumbnail.c
index ce36fdf1d..5407b60bb 100644
--- a/desktop/thumbnail.c
+++ b/desktop/thumbnail.c
@@ -26,6 +26,7 @@
#include "content/content.h"
#include "content/hlcache.h"
#include "desktop/browser.h"
+#include "desktop/knockout.h"
#include "desktop/options.h"
#include "desktop/plotters.h"
#include "desktop/thumbnail.h"
@@ -38,9 +39,13 @@ bool thumbnail_redraw(struct hlcache_handle *content,
{
struct rect clip;
float scale;
+ bool plot_ok = true;
assert(content);
+ if (plot.option_knockout)
+ knockout_plot_start(&plot);
+
/* No selection */
current_redraw_browser = NULL;
@@ -53,15 +58,20 @@ bool thumbnail_redraw(struct hlcache_handle *content,
plot.clip(&clip);
/* Plot white background */
- plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1,
+ plot_ok &= plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1,
plot_style_fill_white);
/* Find the scale we're using */
scale = thumbnail_get_redraw_scale(content, width);
/* Render the content */
- return content_redraw(content, 0, 0, width, height, &clip, scale,
- 0xFFFFFF);
+ plot_ok &= content_redraw(content, 0, 0, width, height, &clip, scale,
+ 0xFFFFFF);
+
+ if (plot.option_knockout)
+ knockout_plot_end();
+
+ return plot_ok;
}