I'm seeking feedback on my changes to make the knockout plotting optional
based on the plotter backend (patch attached). I've 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
(that's what I'm assuming the knockout.c code is doing).
However, 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 patch 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: BTW, also removed what I think is a 2nd instance
of "struct plotter_table plot" (the first one is in
gtk/gtk_plotters.c), right ?
- riscos/save_draw.c
- riscos/print.c: in addition I noticed that the path plotter
function pointer wasn't filled in and this is now fixed.
- pdf/pdf_plotters.c: I also 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: but I guess this needs testing by the GTK
developers if this remains a good choice or not.
- riscos/plotters.c
- desktop/knockout.c: I believe its option_knockout needs to be
'true' because knockout_plot_start/knockout_plot_end needs to
be called for each recursive html_redraw() call.
- riscos/window.c: I'm a bit confused why there were tests on the
content type which determine to additionally install the
knockout plotter in front of the real plotter code as as far as
I believe that only HTML content is profitable to be plotted
in knockout mode, no ?
Does this change make sense ? Anything which I'm overlooking here ?
John.
--
John Tytgat
joty(a)netsurf-browser.org
Show replies by date