From 5cefc9584a3a33ca750a741f2cc7632003897977 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 13 Feb 2011 23:04:26 +0000 Subject: Pass clip rect to browser_window_redraw as pointer. svn path=/trunk/netsurf/; revision=11672 --- amiga/gui.c | 4 ++-- cocoa/BrowserView.m | 2 +- desktop/browser.c | 10 +++++----- desktop/browser.h | 2 +- framebuffer/gui.c | 2 +- gtk/window.c | 2 +- riscos/window.c | 4 ++-- windows/gui.c | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/amiga/gui.c b/amiga/gui.c index c6cdaf019..a6e5a20df 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -3149,7 +3149,7 @@ void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw, clip.x1 = (x1 - sx); clip.y1 = (y1 - sy); - if(browser_window_redraw(bw, -sx, -sy, clip)) + if(browser_window_redraw(bw, -sx, -sy, &clip)) { ami_clearclipreg(&browserglob); BltBitMapRastPort(browserglob.bm, @@ -3300,7 +3300,7 @@ void ami_do_redraw(struct gui_window_2 *g) glob->scale = g->bw->scale; - if(browser_window_redraw(g->bw, -hcurrent, -vcurrent, clip)) + if(browser_window_redraw(g->bw, -hcurrent, -vcurrent, &clip)) { ami_clearclipreg(&browserglob); BltBitMapRastPort(browserglob.bm,0,0,g->win->RPort,bbox->Left,bbox->Top, diff --git a/cocoa/BrowserView.m b/cocoa/BrowserView.m index 95e4a3df9..d968ed136 100644 --- a/cocoa/BrowserView.m +++ b/cocoa/BrowserView.m @@ -141,7 +141,7 @@ static inline NSRect cocoa_get_caret_rect( BrowserView *view ) clip.x1 = cocoa_pt_to_px( NSMaxX( rects[i] ) ); clip.y1 = cocoa_pt_to_px( NSMaxY( rects[i] ) ); - browser_window_redraw(browser, 0, 0, clip); + browser_window_redraw(browser, 0, 0, &clip); } current_redraw_browser = NULL; diff --git a/desktop/browser.c b/desktop/browser.c index 3d5f1a9cb..b8a7818b0 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -90,7 +90,7 @@ static void browser_window_find_target_internal(struct browser_window *bw, /* exported interface, documented in browser.h */ bool browser_window_redraw(struct browser_window *bw, int x, int y, - struct rect clip) + struct rect *clip) { int width = 0; int height = 0; @@ -100,10 +100,10 @@ bool browser_window_redraw(struct browser_window *bw, int x, int y, return false; } - plot.clip(clip.x0, clip.y0, clip.x1, clip.y1); + plot.clip(clip->x0, clip->y0, clip->x1, clip->y1); if (bw->current_content == NULL) { - return plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1, + return plot.rectangle(clip->x0, clip->y0, clip->x1, clip->y1, plot_style_fill_white); } @@ -115,12 +115,12 @@ bool browser_window_redraw(struct browser_window *bw, int x, int y, /* Non-HTML may not fill viewport to extents, so plot white * background fill */ - plot.rectangle(clip.x0, clip.y0, clip.x1, clip.y1, + plot.rectangle(clip->x0, clip->y0, clip->x1, clip->y1, plot_style_fill_white); } return content_redraw(bw->current_content, x, y, width, height, - &clip, bw->scale, 0xFFFFFF); + clip, bw->scale, 0xFFFFFF); } /* exported interface, documented in browser.h */ diff --git a/desktop/browser.h b/desktop/browser.h index 42b9f19ed..59b7d7393 100644 --- a/desktop/browser.h +++ b/desktop/browser.h @@ -273,7 +273,7 @@ bool browser_window_stop_available(struct browser_window *bw); * Units for x, y and clip are pixels. */ bool browser_window_redraw(struct browser_window *bw, int x, int y, - struct rect clip); + struct rect *clip); /** * Check whether browser window is ready for redraw diff --git a/framebuffer/gui.c b/framebuffer/gui.c index 3aebb7e9d..6cec4e7fa 100644 --- a/framebuffer/gui.c +++ b/framebuffer/gui.c @@ -332,7 +332,7 @@ fb_redraw(fbtk_widget_t *widget, browser_window_redraw(bw, x - bwidget->scrollx, y - bwidget->scrolly, - clip); + &clip); current_redraw_browser = NULL; diff --git a/gtk/window.c b/gtk/window.c index 3e2cf8b99..ed0ab6a9f 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -184,7 +184,7 @@ static gboolean nsgtk_window_expose_event(GtkWidget *widget, clip.x1 = event->area.x + event->area.width; clip.y1 = event->area.y + event->area.height; - browser_window_redraw(g->bw, 0, 0, clip); + browser_window_redraw(g->bw, 0, 0, &clip); current_redraw_browser = NULL; diff --git a/riscos/window.c b/riscos/window.c index 643a09f5d..ab5fcab3c 100644 --- a/riscos/window.c +++ b/riscos/window.c @@ -1482,7 +1482,7 @@ void ro_gui_window_redraw(wimp_draw *redraw) if (ro_gui_current_redraw_gui->option.buffer_everything) ro_gui_buffer_open(redraw); - browser_window_redraw(g->bw, 0, 0, clip); + browser_window_redraw(g->bw, 0, 0, &clip); if (ro_gui_current_redraw_gui->option.buffer_everything) ro_gui_buffer_close(); @@ -1580,7 +1580,7 @@ void ro_gui_window_update_boxes(void) { if (use_buffer) ro_gui_buffer_open(&update); - browser_window_redraw(g->bw, 0, 0, clip); + browser_window_redraw(g->bw, 0, 0, &clip); if (use_buffer) ro_gui_buffer_close(); diff --git a/windows/gui.c b/windows/gui.c index 88f67b682..81fb04e26 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -893,7 +893,7 @@ nsws_drawable_paint(struct gui_window *gw, HWND hwnd) browser_window_redraw(gw->bw, -gw->scrollx / gw->bw->scale, -gw->scrolly / gw->bw->scale, - clip); + &clip); } -- cgit v1.2.3