From 5685170036d59c6db307b014476146513713ad5f Mon Sep 17 00:00:00 2001 From: John Tytgat Date: Wed, 30 Jul 2008 19:17:27 +0000 Subject: Make the knockout plotter calling behaviour optional by added a new entry 'option_knockout' to 'struct plotter_table' which basically is a request from that plotter backend for the content redraw routine to get called in such a way that overlapping render areas are avoided as much as possible. It is up to the content redraw code to actually implement this option if it is reasonably profitable. This was and is currently done explicitly by the html content redraw code. On top of that the riscos plotter code was installing the knockout plotter itself for all content types except plaintext and SVG and this is no longer being done in this patch. In more detail: - desktop/plotters.h: added struct plotter_table::option_knockout - render/html_redraw.c(html_redraw): if the plotter backend wants the knockout calling behaviour, install the knockout plotter which will then call the real backend. Also check on the return values of clg and clip plotter calls. - Plotter backend changes: -> no longer plotting in knockout mode: - gtk/gtk_print.c: Also removed a 2nd instance of "struct plotter_table plot". - riscos/save_draw.c - riscos/print.c: Also the path plotter function pointer wasn't filled in and this is now fixed. - pdf/pdf_plotters.c: Removed the flush function as this is optional and we only had a dummy implementation there. -> remaining to request knockout mode if it makes sense based on the content type: - gtk/gtk_plotters.c - riscos/plotters.c - desktop/knockout.c - riscos/window.c: Removed what's believed an obsolete test on the content type which determined to additionally install the knockout plotter in front of the real plotter code. svn path=/trunk/netsurf/; revision=4823 --- gtk/gtk_plotters.c | 3 ++- gtk/gtk_print.c | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'gtk') diff --git a/gtk/gtk_plotters.c b/gtk/gtk_plotters.c index 7a696e84a..9532119fd 100644 --- a/gtk/gtk_plotters.c +++ b/gtk/gtk_plotters.c @@ -93,7 +93,8 @@ const struct plotter_table nsgtk_plotters = { NULL, NULL, NULL, - nsgtk_plot_path + nsgtk_plot_path, + true }; diff --git a/gtk/gtk_print.c b/gtk/gtk_print.c index f32fcc64e..6f1bf976c 100644 --- a/gtk/gtk_print.c +++ b/gtk/gtk_print.c @@ -92,8 +92,6 @@ static void gtk_print_end(void); static GdkRectangle cliprect; -struct plotter_table plot; - static const struct plotter_table nsgtk_print_plotters = { nsgtk_print_plot_clg, nsgtk_print_plot_rectangle, @@ -109,7 +107,8 @@ static const struct plotter_table nsgtk_print_plotters = { NULL, NULL, NULL, - nsgtk_print_plot_path + nsgtk_print_plot_path, + false }; static const struct printer gtk_printer= { -- cgit v1.2.3