summaryrefslogtreecommitdiff
path: root/src/location/labs/qmappolylineobject.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli.qt@gmail.com>2019-12-27 22:39:47 +0100
committerpaolo <paolo.angelelli.qt@gmail.com>2020-02-11 19:35:35 +0100
commita4469cad4041f21e640efa9ca5d0b192dd702955 (patch)
treea6f40549c8679410f65ad84446a69b19b918d75d /src/location/labs/qmappolylineobject.cpp
parente82c41d35ddd6ef0d14e1d01ea1dfd46742bc0fe (diff)
downloadqtlocation-a4469cad4041f21e640efa9ca5d0b192dd702955.tar.gz
Port Map*ObjectPrivateQSG to the shader-based projection geometriesv5.15.0-alpha1
This patch changes the implementation of the scenegraph-based mapobjects (those created by QGeoTiledMap) to be the recently introduced one sporting shader-based map projection. This is much faster than the previous, but may introduce small glitches at this time (mostly on minified polylines). Adding polyline LOD simplification will solve this problem. Compared to equivalent Map Items (that is, Map Items backed by the same underlying implementation), map objects now are approximately 1.5x faster. This measure has been gathered using medium-size polygons (contained in the file 10_countries.json from the geojson_viewer example). The difference is caused by the additional QtQuick geometry related operations (essentially projecting the bounding box for each item) present in MapItems. Smaller polygons may therefore yield larger improvements, larger polygons the opposite. Change-Id: I3fc92b02b74a3a4d001e69755949a98f80d8a3d3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/labs/qmappolylineobject.cpp')
-rw-r--r--src/location/labs/qmappolylineobject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/location/labs/qmappolylineobject.cpp b/src/location/labs/qmappolylineobject.cpp
index 81390d7c..acfe6609 100644
--- a/src/location/labs/qmappolylineobject.cpp
+++ b/src/location/labs/qmappolylineobject.cpp
@@ -76,7 +76,7 @@ QMapPolylineObjectPrivateDefault::QMapPolylineObjectPrivateDefault(QGeoMapObject
QMapPolylineObjectPrivateDefault::QMapPolylineObjectPrivateDefault(const QMapPolylineObjectPrivate &other) : QMapPolylineObjectPrivate(other.q)
{
- m_path = other.path();
+ m_path.setPath(other.path());
m_color = other.color();
m_width = other.width();
}
@@ -88,12 +88,12 @@ QMapPolylineObjectPrivateDefault::~QMapPolylineObjectPrivateDefault()
QList<QGeoCoordinate> QMapPolylineObjectPrivateDefault::path() const
{
- return m_path;
+ return m_path.path();
}
void QMapPolylineObjectPrivateDefault::setPath(const QList<QGeoCoordinate> &path)
{
- m_path = path;
+ m_path.setPath(path);
}
QColor QMapPolylineObjectPrivateDefault::color() const