From 3517286a9404d556c384276d63b73b588fadbcfe Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 3 Jan 2014 22:24:11 +0000 Subject: Draw and layout performance improvements. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5248 a436a847-0d15-0410-975c-d299462d15a1 --- src/port.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/port.c') diff --git a/src/port.c b/src/port.c index 29a7a10..4750064 100644 --- a/src/port.c +++ b/src/port.c @@ -164,9 +164,9 @@ ganv_port_tail_vector(const GanvNode* self, double* dx, double* dy) { - GanvItem* item = GANV_ITEM(self); GanvPort* port = GANV_PORT(self); - GanvCanvas* canvas = GANV_CANVAS(GANV_ITEM(self)->canvas); + GanvItem* item = &port->box.node.item; + GanvCanvas* canvas = GANV_CANVAS(item->canvas); const double px = item->x; const double py = item->y; @@ -186,7 +186,7 @@ ganv_port_tail_vector(const GanvNode* self, break; } - ganv_item_i2w(GANV_ITEM(self)->parent, x, y); + ganv_item_i2w(item->parent, x, y); } static void @@ -197,9 +197,9 @@ ganv_port_head_vector(const GanvNode* self, double* dx, double* dy) { - GanvItem* item = GANV_ITEM(self); GanvPort* port = GANV_PORT(self); - GanvCanvas* canvas = GANV_CANVAS(GANV_ITEM(self)->canvas); + GanvItem* item = &port->box.node.item; + GanvCanvas* canvas = GANV_CANVAS(item->canvas); const double px = item->x; const double py = item->y; @@ -219,7 +219,7 @@ ganv_port_head_vector(const GanvNode* self, break; } - ganv_item_i2w(GANV_ITEM(self)->parent, x, y); + ganv_item_i2w(item->parent, x, y); } static void -- cgit v1.2.1