]> git.street.me.uk Git - andy/viking.git/commit
Optimize: Calculate associated icon of a waypoint only on change.
authorRob Norris <rw_norris@hotmail.com>
Mon, 4 Mar 2013 18:54:31 +0000 (18:54 +0000)
committerRob Norris <rw_norris@hotmail.com>
Thu, 14 Mar 2013 20:01:18 +0000 (20:01 +0000)
commit98acb9a18416ab20112ac4660e6bae5437d96b63
treeb7aee08d6853a2019719830917a94bfea5cf2e78
parent63ffa24473ea2d8028d8b48c18a632f876d0763b
Optimize: Calculate associated icon of a waypoint only on change.

Instead of looking up a hash table on every waypoint draw on every layer draw;
 store the icon reference in the waypoint itself and update only when necessary:

1. When the waypoint icon is changed directly by the user.
or
2. When implicitly changed via the size preference,
 so add method to update all windows and then all waypoints to switch between
 small<->large icons.
src/viktrwlayer.c
src/viktrwlayer.h
src/vikwaypoint.c
src/vikwaypoint.h
src/vikwindow.c