summaryrefslogtreecommitdiff
path: root/beos
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-02-13 22:25:11 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-02-13 22:25:11 +0000
commitfe7921a387c5a71c8ecba7bb605679b7dab4b86f (patch)
treed31c249671b3e71f498dd48b6c42b56f1e278f7f /beos
parentdb2f823e9990cee17b1072ce2296ef88062bc7bd (diff)
downloadnetsurf-fe7921a387c5a71c8ecba7bb605679b7dab4b86f.tar.gz
netsurf-fe7921a387c5a71c8ecba7bb605679b7dab4b86f.tar.bz2
Pass clip rect as struct through content_redraw api. Update the front ends to use this. Note only RO build tested.
svn path=/trunk/netsurf/; revision=11670
Diffstat (limited to 'beos')
-rw-r--r--beos/beos_thumbnail.cpp9
-rw-r--r--beos/beos_window.cpp11
2 files changed, 14 insertions, 6 deletions
diff --git a/beos/beos_thumbnail.cpp b/beos/beos_thumbnail.cpp
index 65c6636d3..c093d34d4 100644
--- a/beos/beos_thumbnail.cpp
+++ b/beos/beos_thumbnail.cpp
@@ -66,6 +66,7 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
float width;
float height;
int depth;
+ struct rect clip;
assert(content);
assert(bitmap);
@@ -125,11 +126,15 @@ bool thumbnail_create(hlcache_handle *content, struct bitmap *bitmap,
content_get_width(content),
plot_style_fill_white);
+ clip.x0 = 0;
+ clip.y0 = 0;
+ clip.x1 = content_get_width(content);
+ clip.y1 = content_get_width(content);
+
/* render the content */
content_redraw(content, 0, 0,
content_get_width(content), content_get_width(content),
- 0, 0,
- content_get_width(content), content_get_width(content),
+ &clip,
1.0, 0xFFFFFF);
view->Sync();
diff --git a/beos/beos_window.cpp b/beos/beos_window.cpp
index 795b7b7fc..98ace7e4a 100644
--- a/beos/beos_window.cpp
+++ b/beos/beos_window.cpp
@@ -918,6 +918,7 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
BRect updateRect;
hlcache_handle *c;
float scale = g->bw->scale;
+ struct rect clip;
assert(g);
assert(g->bw);
@@ -953,13 +954,15 @@ void nsbeos_window_expose_event(BView *view, gui_window *g, BMessage *message)
plot = nsbeos_plotters;
nsbeos_plot_set_scale(g->bw->scale);
current_redraw_browser = g->bw;
+
+ clip.x0 = (int)updateRect.left;
+ clip.y0 = (int)updateRect.top;
+ clip.x1 = (int)updateRect.right + 1;
+ clip.y1 = (int)updateRect.bottom + 1;
content_redraw(c, 0, 0,
(view->Bounds().Width() + 1) * scale,
(view->Bounds().Height() + 1) * scale,
- (int)updateRect.left,
- (int)updateRect.top,
- (int)updateRect.right + 1,
- (int)updateRect.bottom + 1,
+ &clip,
g->bw->scale, 0xFFFFFF);
current_redraw_browser = NULL;