From a4469cad4041f21e640efa9ca5d0b192dd702955 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Fri, 27 Dec 2019 22:39:47 +0100 Subject: Port Map*ObjectPrivateQSG to the shader-based projection geometries 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 --- src/location/labs/qmappolylineobject_p_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/location/labs/qmappolylineobject_p_p.h') 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 #include #include +#include #include QT_BEGIN_NAMESPACE @@ -95,7 +96,7 @@ public: QGeoMapObjectPrivate *clone() override; public: - QList m_path; + QGeoPath m_path; // small overhead compared to plain QList QColor m_color; qreal m_width = 0; -- cgit v1.2.1