From eddae6af0663243a2677674d501f9a87d55798f5 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 30 Jun 2011 15:48:07 +0000 Subject: 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 --- riscos/content-handlers/artworks.c | 6 +++--- riscos/content-handlers/draw.c | 6 +++--- riscos/content-handlers/sprite.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'riscos/content-handlers') diff --git a/riscos/content-handlers/artworks.c b/riscos/content-handlers/artworks.c index 0747a3de0..ffbd7835e 100644 --- a/riscos/content-handlers/artworks.c +++ b/riscos/content-handlers/artworks.c @@ -111,7 +111,7 @@ static nserror artworks_create(const content_handler *handler, static bool artworks_convert(struct content *c); static void artworks_destroy(struct content *c); static bool artworks_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip); + const struct rect *clip, const struct redraw_context *ctx); static nserror artworks_clone(const struct content *old, struct content **newc); static content_type artworks_content_type(lwc_string *mime_type); @@ -330,7 +330,7 @@ void artworks_destroy(struct content *c) */ bool artworks_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip) + const struct rect *clip, const struct redraw_context *ctx) { static const ns_os_vdu_var_list vars = { os_MODEVAR_XEIG_FACTOR, @@ -353,7 +353,7 @@ bool artworks_redraw(struct content *c, struct content_redraw_data *data, int clip_x1 = clip->x1; int clip_y1 = clip->y1; - if (plot.flush && !plot.flush()) + if (ctx->plot->flush && !ctx->plot->flush()) return false; /* pick up render addresses again in case they've changed diff --git a/riscos/content-handlers/draw.c b/riscos/content-handlers/draw.c index e8a9d654a..5f3865921 100644 --- a/riscos/content-handlers/draw.c +++ b/riscos/content-handlers/draw.c @@ -51,7 +51,7 @@ static nserror draw_create(const content_handler *handler, static bool draw_convert(struct content *c); static void draw_destroy(struct content *c); static bool draw_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip); + const struct rect *clip, const struct redraw_context *ctx); static nserror draw_clone(const struct content *old, struct content **newc); static content_type draw_content_type(lwc_string *mime_type); @@ -207,7 +207,7 @@ void draw_destroy(struct content *c) */ bool draw_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip) + const struct rect *clip, const struct redraw_context *ctx) { draw_content *draw = (draw_content *) c; os_trfm matrix; @@ -216,7 +216,7 @@ bool draw_redraw(struct content *c, struct content_redraw_data *data, const void *src_data; os_error *error; - if (plot.flush && !plot.flush()) + if (ctx->plot->flush && !ctx->plot->flush()) return false; if (!c->width || !c->height) diff --git a/riscos/content-handlers/sprite.c b/riscos/content-handlers/sprite.c index f10c0166f..9260703f4 100644 --- a/riscos/content-handlers/sprite.c +++ b/riscos/content-handlers/sprite.c @@ -53,7 +53,7 @@ static nserror sprite_create(const content_handler *handler, static bool sprite_convert(struct content *c); static void sprite_destroy(struct content *c); static bool sprite_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip); + const struct rect *clip, const struct redraw_context *ctx); static nserror sprite_clone(const struct content *old, struct content **newc); static content_type sprite_content_type(lwc_string *mime_type); @@ -207,11 +207,11 @@ void sprite_destroy(struct content *c) */ bool sprite_redraw(struct content *c, struct content_redraw_data *data, - const struct rect *clip) + const struct rect *clip, const struct redraw_context *ctx) { sprite_content *sprite = (sprite_content *) c; - if (plot.flush && !plot.flush()) + if (ctx->plot->flush && !ctx->plot->flush()) return false; return image_redraw(sprite->data, -- cgit v1.2.3