From 1165edf662baa3286ff76df54f2db6819340d0a3 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 1 Jul 2009 13:53:06 +0000 Subject: remove redundant clg call svn path=/trunk/netsurf/; revision=8240 --- desktop/knockout.c | 16 +--------------- desktop/plotters.h | 2 -- desktop/save_pdf/pdf_plotters.c | 7 ------- 3 files changed, 1 insertion(+), 24 deletions(-) (limited to 'desktop') diff --git a/desktop/knockout.c b/desktop/knockout.c index 4df32bb50..1fbb67968 100644 --- a/desktop/knockout.c +++ b/desktop/knockout.c @@ -86,7 +86,6 @@ static bool knockout_plot_fill_recursive(struct knockout_box *box, colour c); static bool knockout_plot_bitmap_recursive(struct knockout_box *box, struct knockout_entry *entry); -static bool knockout_plot_clg(colour c); static bool knockout_plot_rectangle(int x0, int y0, int width, int height, int line_width, colour c, bool dotted, bool dashed); static bool knockout_plot_line(int x0, int y0, int x1, int y1, int width, @@ -111,7 +110,6 @@ static bool knockout_plot_path(const float *p, unsigned int n, colour fill, const struct plotter_table knockout_plotters = { - .clg = knockout_plot_clg, .rectangle = knockout_plot_rectangle, .line = knockout_plot_line, .polygon = knockout_plot_polygon, @@ -130,7 +128,6 @@ const struct plotter_table knockout_plotters = { typedef enum { - KNOCKOUT_PLOT_CLG, /* translated to _FILL */ KNOCKOUT_PLOT_RECTANGLE, KNOCKOUT_PLOT_LINE, KNOCKOUT_PLOT_POLYGON, @@ -162,9 +159,6 @@ struct knockout_entry { knockout_type type; struct knockout_box *box; /* relating series of knockout clips */ union { - struct { - colour c; - } clg; struct { int x0; int y0; @@ -270,7 +264,7 @@ bool knockout_plot_start(struct plotter_table *plotter) /* check if we're recursing */ if (nested_depth++ > 0) { /* we should already have the knockout renderer as default */ - assert(plotter->clg == knockout_plotters.clg); + assert(plotter->rectangle == knockout_plotters.rectangle); return true; } @@ -323,10 +317,6 @@ bool knockout_plot_flush(void) for (i = 0; i < knockout_entry_cur; i++) { switch (knockout_entries[i].type) { - case KNOCKOUT_PLOT_CLG: - success &= plot.clg( - knockout_entries[i].data.clg.c); - break; case KNOCKOUT_PLOT_RECTANGLE: success &= plot.rectangle( knockout_entries[i].data.rectangle.x0, @@ -634,10 +624,6 @@ bool knockout_plot_bitmap_recursive(struct knockout_box *box, return success; } -bool knockout_plot_clg(colour c) -{ - return knockout_plot_fill(clip_x0_cur, clip_y0_cur, clip_x1_cur, clip_y1_cur, c); -} bool knockout_plot_rectangle(int x0, int y0, int width, int height, diff --git a/desktop/plotters.h b/desktop/plotters.h index 7feae4929..8a7183f89 100644 --- a/desktop/plotters.h +++ b/desktop/plotters.h @@ -38,7 +38,6 @@ typedef unsigned long bitmap_flags_t; /** Set of target specific plotting functions. * * The functions are: - * clg - Clears plotting area to a flat colour (if needed) * arc - Plots an arc, around (x,y), from anticlockwise from angle1 to * angle2. Angles are measured anticlockwise from horizontal, in * degrees. @@ -95,7 +94,6 @@ typedef unsigned long bitmap_flags_t; * 3 | | | | | | */ struct plotter_table { - bool (*clg)(colour c); bool (*rectangle)(int x0, int y0, int width, int height, int line_width, colour c, bool dotted, bool dashed); bool (*line)(int x0, int y0, int x1, int y1, int width, diff --git a/desktop/save_pdf/pdf_plotters.c b/desktop/save_pdf/pdf_plotters.c index 92ede016a..74c36925b 100644 --- a/desktop/save_pdf/pdf_plotters.c +++ b/desktop/save_pdf/pdf_plotters.c @@ -45,7 +45,6 @@ /* #define PDF_DEBUG */ /* #define PDF_DEBUG_DUMPGRID */ -static bool pdf_plot_clg(colour c); static bool pdf_plot_rectangle(int x0, int y0, int width, int height, int line_width, colour c, bool dotted, bool dashed); static bool pdf_plot_line(int x0, int y0, int x1, int y1, int width, @@ -124,7 +123,6 @@ static int last_clip_x0, last_clip_y0, last_clip_x1, last_clip_y1; static const struct print_settings *settings; static const struct plotter_table pdf_plotters = { - .clg = pdf_plot_clg, .rectangle = pdf_plot_rectangle, .line = pdf_plot_line, .polygon = pdf_plot_polygon, @@ -148,11 +146,6 @@ const struct printer pdf_printer = { static char *owner_pass; static char *user_pass; -bool pdf_plot_clg(colour c) -{ - return true; -} - bool pdf_plot_rectangle(int x0, int y0, int width, int height, int line_width, colour c, bool dotted, bool dashed) { -- cgit v1.2.3