More changes in path drawing


the changes I made in path drawing introduced a pretty nasty
regression in performance. The reason is that ClutterActor creation is
_slow_. Even worse, the time consumption is non-linear so creating
twice as many ClutterActors takes more than twice as much time.
Because in the new code ChamplainMarkers (which inherit from
ClutterActor) were used as nodes of the path, this lead to terrible

The only solution was not to use ClutterActors as path nodes.
Therefore, the path-part had to be separated into an extra class -
ChamplainPathLayer (in principle similar to the original
ChamplainPolygon). I wanted to achieve the same functionality as
before ( things like movable nodes with automatically redrawn path)
which means I wanted to be able to insert both markers and normal
points as nodes of the path. As a result, I created a new interface -
ChamplainLocation, which has to be implemented by objects that have
both latitude and longitude. So now objects implementing
ChamplainLocation can be inserted into ChamplainPathLayer.
ChamplainCoordinate is a very simple class implementing
ChamplainLocation - use this class to insert points into
ChamplainPathLayer if you need good performance.


ChamplainLocation - interface for objects with latitude and longitude
ChamplainCoordinate - simple gobject implementing ChamplainLocation
ChamplainMarker - now implements ChamplainLocation too
ChamplainPathLayer - insert objects implementing ChamplainLocation to
draw the path
ChamplainMarkerLayer - now doesn't contatin the path-drawing methods

Please test and let me know if the performance got better.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]