summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-06-30 15:48:07 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-06-30 15:48:07 +0000
commiteddae6af0663243a2677674d501f9a87d55798f5 (patch)
tree08562171f870a6b592d624adfbfd0d6fa11fcdcb /beos
parenta5dc6b9e6637c85d18510ac6446ee4a8a7955e7b (diff)
downloadnetsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.gz
netsurf-eddae6af0663243a2677674d501f9a87d55798f5.tar.bz2
Remove plotter table global. Pass a redraw context around redraw functions. Knockout could be handled better. Note: untested on most front ends.
svn path=/trunk/netsurf/; revision=12543
Diffstat (limited to 'beos')
-rw-r--r--beos/beos_scaffolding.cpp7
-rw-r--r--beos/beos_thumbnail.cpp9
-rw-r--r--beos/beos_window.cpp8
3 files changed, 18 insertions, 6 deletions
diff --git a/beos/beos_scaffolding.cpp b/beos/beos_scaffolding.cpp
index 63c0be4dc..6693dc1c7 100644
--- a/beos/beos_scaffolding.cpp
+++ b/beos/beos_scaffolding.cpp
@@ -1384,6 +1384,11 @@ gboolean nsbeos_history_expose_event(beosWidget *widget,
struct beos_history_window *hw = (struct beos_history_window *)g;
struct browser_window *bw = nsbeos_get_browser_for_gui(hw->g->top_level);
+ struct redraw_context ctx = {
+ .interactive = true,
+ .plot = &nsbeos_plotters
+ };
+
current_widget = widget;
current_drawable = widget->window;
current_gc = gdk_gc_new(current_drawable);
@@ -1392,7 +1397,7 @@ gboolean nsbeos_history_expose_event(beosWidget *widget,
#endif
plot = nsbeos_plotters;
- history_redraw(bw->history);
+ history_redraw(bw->history, &ctx);
g_object_unref(current_gc);
#ifdef CAIRO_VERSION
diff --git a/beos/beos_thumbnail.cpp b/beos/beos_thumbnail.cpp
index 88e291c44..3d49d5c10 100644
--- a/beos/beos_thumbnail.cpp
+++ b/beos/beos_thumbnail.cpp
@@ -71,6 +71,11 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
int big_height;
int depth;
+ struct redraw_context ctx = {
+ .interactive = false,
+ .plot = &nsbeos_plotters
+ };
+
assert(content);
assert(bitmap);
@@ -116,10 +121,8 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
/* impose our view on the content... */
nsbeos_current_gc_set(view);
- plot = nsbeos_plotters;
-
/* render the content */
- thumbnail_redraw(content, big_width, big_height);
+ thumbnail_redraw(content, big_width, big_height, &ctx);
view->Sync();
view->UnlockLooper();
diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp
index fc2c568e2..d7153fb79 100644
--- a/beos/beos_window.cpp
+++ b/beos/beos_window.cpp
@@ -920,6 +920,11 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
float scale = g->bw->scale;
struct rect clip;
+ struct redraw_context ctx = {
+ .interactive = true,
+ .plot = &nsbeos_plotters
+ };
+
assert(g);
assert(g->bw);
@@ -947,7 +952,6 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
if (view->Window())
view->Window()->BeginViewTransaction();
- plot = nsbeos_plotters;
current_redraw_browser = g->bw;
clip.x0 = (int)updateRect.left;
@@ -955,7 +959,7 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
clip.x1 = (int)updateRect.right + 1;
clip.y1 = (int)updateRect.bottom + 1;
- browser_window_redraw(g->bw, 0, 0, &clip);
+ browser_window_redraw(g->bw, 0, 0, &clip, &ctx);
current_redraw_browser = NULL;