- iMissing knockout option to false

- Use Begin/EndViewTransaction() though it doesn't seem to help much reduce flicker
- some fiddling with bitmaps

svn path=/trunk/netsurf/; revision=5466
This commit is contained in:
François Revel 2008-10-01 21:04:32 +00:00
parent dcb33e9835
commit d4c4800fec
3 changed files with 25 additions and 4 deletions

View File

@ -133,6 +133,7 @@ void *bitmap_create(int width, int height, unsigned int state)
bmp->pretile_x = bmp->pretile_y = bmp->pretile_xy = NULL;
bmp->opaque = false;
bmp->opaque = (state & BITMAP_OPAQUE) != 0; // XXX store state instead
#if 0 /* GTK */
bmp->primary = gdk_pixbuf_new(GDK_COLORSPACE_RGB, true, 8,
@ -174,7 +175,8 @@ bool bitmap_test_opaque(void *vbitmap)
struct bitmap *bitmap = (struct bitmap *)vbitmap;
assert(bitmap);
/* todo: test if bitmap as opaque */
return false;//bitmap->opaque;
//return bitmap->opaque;
return true;
}
@ -188,7 +190,7 @@ bool bitmap_get_opaque(void *vbitmap)
struct bitmap *bitmap = (struct bitmap *)vbitmap;
assert(bitmap);
/* todo: get whether bitmap is opaque */
return false;//bitmap->opaque;
return bitmap->opaque;
}

View File

@ -106,7 +106,8 @@ const struct plotter_table nsbeos_plotters = {
NULL,
NULL,
NULL,
nsbeos_plot_path
nsbeos_plot_path,
false // option_knockout
};

View File

@ -292,8 +292,20 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
BRect frame(0,0,-1,-1); // will be resized later
g->view = new NSBrowserFrameView(frame, g);
/* set the default background colour of the drawing area to white. */
//g->view->SetViewColor(B_TRANSPARENT_COLOR);
g->view->SetViewColor(kWhiteColor);
g->view->SetHighColor(kWhiteColor);
g->view->SetLowColor(kWhiteColor);
#ifdef B_BEOS_VERSION_DANO
/* enable double-buffering on the content view */
/*
XXX: doesn't really work
g->view->SetDoubleBuffering(B_UPDATE_INVALIDATED
| B_UPDATE_SCROLLED
//| B_UPDATE_RESIZED
| B_UPDATE_EXPOSED);
*/
#endif
if (bw->parent != NULL ) {
g->toplevel = false;
@ -670,6 +682,9 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
return;
nsbeos_current_gc_set(view);
if (view->Window())
view->Window()->BeginViewTransaction();
plot = nsbeos_plotters;
nsbeos_plot_set_scale(g->bw->scale);
content_redraw(c, 0, 0,
@ -684,6 +699,9 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
if (g->careth != 0)
nsbeos_plot_caret(g->caretx, g->carety, g->careth);
if (view->Window())
view->Window()->EndViewTransaction();
// reset clipping just in case
view->ConstrainClippingRegion(NULL);
nsbeos_current_gc_set(NULL);