Pass clip rect to browser_window_redraw as pointer.

svn path=/trunk/netsurf/; revision=11672
This commit is contained in:
Michael Drake 2011-02-13 23:04:26 +00:00
parent bdfda9d146
commit 5cefc9584a
8 changed files with 14 additions and 14 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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 */

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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);
}