summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-01 21:04:32 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-10-01 21:04:32 +0000
commitd4c4800fec9608b982182398af6ac33a2e33aeae (patch)
tree6d6fa9c088d722af28c26580d1c1399e22f10509 /beos
parentdcb33e9835cc9a3dba2049e6913e10e6b524d70f (diff)
downloadnetsurf-d4c4800fec9608b982182398af6ac33a2e33aeae.tar.gz
netsurf-d4c4800fec9608b982182398af6ac33a2e33aeae.tar.bz2
- 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
Diffstat (limited to 'beos')
-rw-r--r--beos/beos_bitmap.cpp6
-rw-r--r--beos/beos_plotters.cpp3
-rw-r--r--beos/beos_window.cpp20
3 files changed, 25 insertions, 4 deletions
diff --git a/beos/beos_bitmap.cpp b/beos/beos_bitmap.cpp
index 06e686c0e..cfb824e25 100644
--- a/beos/beos_bitmap.cpp
+++ b/beos/beos_bitmap.cpp
@@ -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;
}
diff --git a/beos/beos_plotters.cpp b/beos/beos_plotters.cpp
index 8628fcb46..dfcfc71d7 100644
--- a/beos/beos_plotters.cpp
+++ b/beos/beos_plotters.cpp
@@ -106,7 +106,8 @@ const struct plotter_table nsbeos_plotters = {
NULL,
NULL,
NULL,
- nsbeos_plot_path
+ nsbeos_plot_path,
+ false // option_knockout
};
diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp
index 1d03304a3..894b494fc 100644
--- a/beos/beos_window.cpp
+++ b/beos/beos_window.cpp
@@ -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);