summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-09-14 12:44:32 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2013-09-14 23:52:31 +0100
commit04a118c4153a4c727c5843162f147311054ebf5a (patch)
treee0dc30e81722b2897d979ce1be5722a7d78db48f
parentc32c68f4ed7bd891f547ad935b00eda0add80ef7 (diff)
downloadnetsurf-04a118c4153a4c727c5843162f147311054ebf5a.tar.gz
netsurf-04a118c4153a4c727c5843162f147311054ebf5a.tar.bz2
treeview deferred redraw
-rw-r--r--amiga/tree.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/amiga/tree.c b/amiga/tree.c
index c67c4a0eb..a017f0fe5 100644
--- a/amiga/tree.c
+++ b/amiga/tree.c
@@ -53,6 +53,7 @@
#include "amiga/drag.h" /* drag icon stuff */
#include "amiga/theme.h" /* pointers */
#include "amiga/filetype.h"
+#include "amiga/schedule.h"
#include "utils/nsoption.h"
#include "content/urldb.h"
#include "desktop/cookie_manager.h"
@@ -101,6 +102,14 @@ struct treeview_window {
struct MinList shared_pens;
};
+struct ami_tree_redraw_req {
+ int x;
+ int y;
+ int width;
+ int height;
+ struct treeview_window *twin;
+};
+
void ami_tree_draw(struct treeview_window *twin);
static void ami_tree_redraw_request(int x, int y, int width, int height,
void *data);
@@ -1214,9 +1223,14 @@ void ami_tree_draw(struct treeview_window *twin)
ami_tree_redraw_request(x, y, bbox->Width, bbox->Height, twin);
}
-void ami_tree_redraw_request(int x, int y, int width, int height, void *data)
+static void ami_tree_redraw_req(void *p)
{
- struct treeview_window *twin = data;
+ struct ami_tree_redraw_req *atrr_data = (struct ami_tree_redraw_req *)p;
+ int x = atrr_data->x;
+ int y = atrr_data->y;
+ int width = atrr_data->width;
+ int height = atrr_data->height;
+ struct treeview_window *twin = atrr_data->twin;
struct IBox *bbox;
int pos_x, pos_y;
int tile_x, tile_y, tile_w, tile_h;
@@ -1276,6 +1290,21 @@ void ami_tree_redraw_request(int x, int y, int width, int height, void *data)
}
}
+ FreeVec(atrr_data);
ami_update_pointer(twin->win, GUI_POINTER_DEFAULT);
glob = &browserglob;
}
+
+void ami_tree_redraw_request(int x, int y, int width, int height, void *data)
+{
+ struct ami_tree_redraw_req *atrr_data = AllocVec(sizeof(struct ami_tree_redraw_req), MEMF_CLEAR | MEMF_PRIVATE);
+
+ atrr_data->x = x;
+ atrr_data->y = y;
+ atrr_data->width = width;
+ atrr_data->height = height;
+ atrr_data->twin = (struct treeview_window *)data;
+
+ schedule(0, ami_tree_redraw_req, atrr_data);
+}
+