diff options
author | David Robillard <d@drobilla.net> | 2014-01-03 22:34:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-03 22:34:38 +0000 |
commit | cac7e4e5e5b4ad8331ba75649dcc84ead3f4a5b4 (patch) | |
tree | 15eb2331de2c941f6106269bb83e35b331413104 /src/box.c | |
parent | 3517286a9404d556c384276d63b73b588fadbcfe (diff) | |
download | ganv-cac7e4e5e5b4ad8331ba75649dcc84ead3f4a5b4.tar.gz ganv-cac7e4e5e5b4ad8331ba75649dcc84ead3f4a5b4.tar.bz2 ganv-cac7e4e5e5b4ad8331ba75649dcc84ead3f4a5b4.zip |
Improve performance by avoiding unnecessary i2w conversions.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5249 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/box.c')
-rw-r--r-- | src/box.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -149,7 +149,7 @@ ganv_box_request_redraw(GanvItem* item, ganv_box_bounds_item(coords, &x1, &y1, &x2, &y2); if (!world) { - // Convert from parent-relative coordinates to world coordinates + // Convert from item-relative coordinates to world coordinates ganv_item_i2w_pair(item, &x1, &y1, &x2, &y2); } @@ -170,7 +170,6 @@ ganv_box_bounds(GanvItem* item, // Note this will not be correct if children are outside the box bounds GanvBox* box = (GanvBox*)item; ganv_box_bounds_item(&box->impl->coords, x1, y1, x2, y2); - ganv_item_i2w_pair(item, x1, y1, x2, y2); } static void @@ -196,6 +195,7 @@ ganv_box_update(GanvItem* item, int flags) // Get bounding box double x1, x2, y1, y2; ganv_box_bounds(item, &x1, &y1, &x2, &y2); + ganv_item_i2w_pair(item, &x1, &y1, &x2, &y2); // Update item canvas coordinates ganv_canvas_base_w2c_d(GANV_CANVAS_BASE(item->canvas), x1, y1, &item->x1, &item->y1); |