diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-06-23 12:01:13 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-06-23 12:10:57 +0000 |
commit | 05abf629c9e55c786a909ac9f729a8c3784e95a4 (patch) | |
tree | 6893b7f2b633e82dc3086a92d4ff9a52c9cc74c2 /src/imports | |
parent | 233349abd3697c26041e7baf261ebfee678fc323 (diff) | |
download | qtlocation-05abf629c9e55c786a909ac9f729a8c3784e95a4.tar.gz |
Migrate to cross-API helper scenegraph nodes
Maps are now functional with the Direct3D 12 as well.
Change-Id: Ia03c6c5b10d74895140ad10835df0ae1ea9724b2
Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/location/qdeclarativegeomap.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp index 7e000c06..a8d93fab 100644 --- a/src/imports/location/qdeclarativegeomap.cpp +++ b/src/imports/location/qdeclarativegeomap.cpp @@ -45,7 +45,7 @@ #include <QtPositioning/QGeoCircle> #include <QtPositioning/QGeoRectangle> #include <QtQuick/QQuickWindow> -#include <QtQuick/QSGSimpleRectNode> +#include <QtQuick/QSGRectangleNode> #include <QtQuick/private/qquickwindow_p.h> #include <QtQml/qqmlinfo.h> #include <cmath> @@ -450,13 +450,12 @@ QSGNode *QDeclarativeGeoMap::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeDa return 0; } - QSGSimpleRectNode *root = static_cast<QSGSimpleRectNode *>(oldNode); + QSGRectangleNode *root = static_cast<QSGRectangleNode *>(oldNode); if (!root) - root = new QSGSimpleRectNode(boundingRect(), m_color); - else { - root->setRect(boundingRect()); - root->setColor(m_color); - } + root = window()->createRectangleNode(); + + root->setRect(boundingRect()); + root->setColor(m_color); QSGNode *content = root->childCount() ? root->firstChild() : 0; content = m_map->updateSceneGraph(content, window()); |