summaryrefslogtreecommitdiff
path: root/src/location/labs/qmappolylineobject_p_p.h
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_p_p.h
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_p_p.h')
-rw-r--r--src/location/labs/qmappolylineobject_p_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/location/labs/qmappolylineobject_p_p.h b/src/location/labs/qmappolylineobject_p_p.h
index a0eb3711..3fdf1a1f 100644
--- a/src/location/labs/qmappolylineobject_p_p.h
+++ b/src/location/labs/qmappolylineobject_p_p.h
@@ -51,6 +51,7 @@
#include <QtLocation/private/qlocationglobal_p.h>
#include <QtLocation/private/qgeomapobject_p_p.h>
#include <QGeoCoordinate>
+#include <QGeoPath>
#include <QColor>
QT_BEGIN_NAMESPACE
@@ -95,7 +96,7 @@ public:
QGeoMapObjectPrivate *clone() override;
public:
- QList<QGeoCoordinate> m_path;
+ QGeoPath m_path; // small overhead compared to plain QList<QGeoCoordinate>
QColor m_color;
qreal m_width = 0;