mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 13:06:49 +03:00
Pass clip rect to browser_window_redraw as pointer.
svn path=/trunk/netsurf/; revision=11672
This commit is contained in:
parent
bdfda9d146
commit
5cefc9584a
@ -3149,7 +3149,7 @@ void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw,
|
|||||||
clip.x1 = (x1 - sx);
|
clip.x1 = (x1 - sx);
|
||||||
clip.y1 = (y1 - sy);
|
clip.y1 = (y1 - sy);
|
||||||
|
|
||||||
if(browser_window_redraw(bw, -sx, -sy, clip))
|
if(browser_window_redraw(bw, -sx, -sy, &clip))
|
||||||
{
|
{
|
||||||
ami_clearclipreg(&browserglob);
|
ami_clearclipreg(&browserglob);
|
||||||
BltBitMapRastPort(browserglob.bm,
|
BltBitMapRastPort(browserglob.bm,
|
||||||
@ -3300,7 +3300,7 @@ void ami_do_redraw(struct gui_window_2 *g)
|
|||||||
|
|
||||||
glob->scale = g->bw->scale;
|
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);
|
ami_clearclipreg(&browserglob);
|
||||||
BltBitMapRastPort(browserglob.bm,0,0,g->win->RPort,bbox->Left,bbox->Top,
|
BltBitMapRastPort(browserglob.bm,0,0,g->win->RPort,bbox->Left,bbox->Top,
|
||||||
|
@ -141,7 +141,7 @@ static inline NSRect cocoa_get_caret_rect( BrowserView *view )
|
|||||||
clip.x1 = cocoa_pt_to_px( NSMaxX( rects[i] ) );
|
clip.x1 = cocoa_pt_to_px( NSMaxX( rects[i] ) );
|
||||||
clip.y1 = cocoa_pt_to_px( NSMaxY( 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;
|
current_redraw_browser = NULL;
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@ static void browser_window_find_target_internal(struct browser_window *bw,
|
|||||||
|
|
||||||
/* exported interface, documented in browser.h */
|
/* exported interface, documented in browser.h */
|
||||||
bool browser_window_redraw(struct browser_window *bw, int x, int y,
|
bool browser_window_redraw(struct browser_window *bw, int x, int y,
|
||||||
struct rect clip)
|
struct rect *clip)
|
||||||
{
|
{
|
||||||
int width = 0;
|
int width = 0;
|
||||||
int height = 0;
|
int height = 0;
|
||||||
@ -100,10 +100,10 @@ bool browser_window_redraw(struct browser_window *bw, int x, int y,
|
|||||||
return false;
|
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) {
|
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);
|
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
|
/* Non-HTML may not fill viewport to extents, so plot white
|
||||||
* background fill */
|
* 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);
|
plot_style_fill_white);
|
||||||
}
|
}
|
||||||
|
|
||||||
return content_redraw(bw->current_content, x, y, width, height,
|
return content_redraw(bw->current_content, x, y, width, height,
|
||||||
&clip, bw->scale, 0xFFFFFF);
|
clip, bw->scale, 0xFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* exported interface, documented in browser.h */
|
/* exported interface, documented in browser.h */
|
||||||
|
@ -273,7 +273,7 @@ bool browser_window_stop_available(struct browser_window *bw);
|
|||||||
* Units for x, y and clip are pixels.
|
* Units for x, y and clip are pixels.
|
||||||
*/
|
*/
|
||||||
bool browser_window_redraw(struct browser_window *bw, int x, int y,
|
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
|
* Check whether browser window is ready for redraw
|
||||||
|
@ -332,7 +332,7 @@ fb_redraw(fbtk_widget_t *widget,
|
|||||||
|
|
||||||
browser_window_redraw(bw,
|
browser_window_redraw(bw,
|
||||||
x - bwidget->scrollx, y - bwidget->scrolly,
|
x - bwidget->scrollx, y - bwidget->scrolly,
|
||||||
clip);
|
&clip);
|
||||||
|
|
||||||
current_redraw_browser = NULL;
|
current_redraw_browser = NULL;
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ static gboolean nsgtk_window_expose_event(GtkWidget *widget,
|
|||||||
clip.x1 = event->area.x + event->area.width;
|
clip.x1 = event->area.x + event->area.width;
|
||||||
clip.y1 = event->area.y + event->area.height;
|
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;
|
current_redraw_browser = NULL;
|
||||||
|
|
||||||
|
@ -1482,7 +1482,7 @@ void ro_gui_window_redraw(wimp_draw *redraw)
|
|||||||
if (ro_gui_current_redraw_gui->option.buffer_everything)
|
if (ro_gui_current_redraw_gui->option.buffer_everything)
|
||||||
ro_gui_buffer_open(redraw);
|
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)
|
if (ro_gui_current_redraw_gui->option.buffer_everything)
|
||||||
ro_gui_buffer_close();
|
ro_gui_buffer_close();
|
||||||
@ -1580,7 +1580,7 @@ void ro_gui_window_update_boxes(void) {
|
|||||||
if (use_buffer)
|
if (use_buffer)
|
||||||
ro_gui_buffer_open(&update);
|
ro_gui_buffer_open(&update);
|
||||||
|
|
||||||
browser_window_redraw(g->bw, 0, 0, clip);
|
browser_window_redraw(g->bw, 0, 0, &clip);
|
||||||
|
|
||||||
if (use_buffer)
|
if (use_buffer)
|
||||||
ro_gui_buffer_close();
|
ro_gui_buffer_close();
|
||||||
|
@ -893,7 +893,7 @@ nsws_drawable_paint(struct gui_window *gw, HWND hwnd)
|
|||||||
browser_window_redraw(gw->bw,
|
browser_window_redraw(gw->bw,
|
||||||
-gw->scrollx / gw->bw->scale,
|
-gw->scrollx / gw->bw->scale,
|
||||||
-gw->scrolly / gw->bw->scale,
|
-gw->scrolly / gw->bw->scale,
|
||||||
clip);
|
&clip);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user