[Marble-devel] Review Request 124074: Implemented outlines for GeoLineStringGraphicsItems.

Torsten Rahn tackat at kde.org
Sun Jun 14 02:39:25 UTC 2015



> On Juni 12, 2015, 2:02 vorm., Torsten Rahn wrote:
> > src/lib/marble/layers/GeometryLayer.cpp, line 289
> > <https://git.reviewboard.kde.org/r/124074/diff/1/?file=379731#file379731line289>
> >
> >     This gets sorted on every single repaint. How long does this take for a bigger OSM file on slow hardware? Would it make sense to cache this somewhere?
> 
> Dávid Kolozsvári wrote:
>     I think something like this should have been already present because every `GeoGraphicsItem` has a z-value and this should be taken into account when drawing them.
>     As for the performance: for a small map, it takes only 1-2 ms to sort the list*, for a big map it takes 5-7 ms, while the painting takes 20-25 ms for a small and 80-110 ms for a big map. The performance impact is about 5-10% and I think this is a must in order to properly draw everything depending on their z-value.
>     Caching it doesn't make sense for me, because at every repaint the `items` list is changed, so it needs to be sorted again.
>     
>     *I think that my laptop has a pretty slow hardware, but even though, the relative performance impact should remain the same for slower and faster machines too (about 5-10%).

Just to be able to judge: What CPU generation is your laptop based on?


- Torsten


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124074/#review81400
-----------------------------------------------------------


On Juni 13, 2015, 9:10 nachm., Dávid Kolozsvári wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124074/
> -----------------------------------------------------------
> 
> (Updated Juni 13, 2015, 9:10 nachm.)
> 
> 
> Review request for Marble.
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> This patch adds support for outlines on `GeoLineStringGraphicsItems`, which represent the roads, streets, paths and ways on the OSM vector tiles. The main idea is to draw behind every `GeoLineStringGraphicsItem` the same line(implemented a `GeoLineStringGraphicsItem::copyAsOutline()` function for this purpose) with the pen color(outline color) and the original line on top of that with the brush color(fill color) and a little thinner.
> Painting these outlines have a small impact on the performance: cca. 10 ms(on my laptop) on a large map, which has 2000+ lines. Because of that, this feature can be disabled if map quality is set to `Low` or `Outline`.
> 
> On the other hand, I've added some new features to `GeoDataVisualCategory`, like `HighwayCycleway` and `HighwayFootway`, which are now rendered correctly on OSM vector tiles.
> 
> 
> Diffs
> -----
> 
>   src/lib/marble/geodata/data/GeoDataFeature.h ea23cd8 
>   src/lib/marble/geodata/data/GeoDataFeature.cpp 6f330fb 
>   src/lib/marble/geodata/data/GeoDataFeature_p.h 496c356 
>   src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.h 4842809 
>   src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp 4320c07 
>   src/lib/marble/layers/GeometryLayer.cpp 9eb3f50 
> 
> Diff: https://git.reviewboard.kde.org/r/124074/diff/
> 
> 
> Testing
> -------
> 
> The performance impact is acceptable, the result is ok and works for me.
> 
> 
> Thanks,
> 
> Dávid Kolozsvári
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20150614/473a9b85/attachment-0001.html>


More information about the Marble-devel mailing list