summaryrefslogtreecommitdiff
path: root/src/location/maps
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-02-28 15:57:47 +0100
committerAlex Blasche <alexander.blasche@qt.io>2017-02-28 15:57:47 +0100
commit461da8f31a90b3ed5e98133850f0776c5e0c2a2d (patch)
tree756f31e38b1b4f50f842355e1d7f9e728a4c9a4e /src/location/maps
parent11e6a62957433843816b41ad11fada7ca8eab85c (diff)
parenta1c8a23c52087300ffd7bf7e61bdfaab8ff6ecc9 (diff)
downloadqtlocation-461da8f31a90b3ed5e98133850f0776c5e0c2a2d.tar.gz
Merge remote-tracking branch 'gerrit/5.8' into 5.9
Change-Id: I3c27a0635fa324dfea7a1d19774a66e21c066bbe
Diffstat (limited to 'src/location/maps')
-rw-r--r--src/location/maps/qgeotiledmapscene.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/location/maps/qgeotiledmapscene.cpp b/src/location/maps/qgeotiledmapscene.cpp
index 7a38153e..3711841d 100644
--- a/src/location/maps/qgeotiledmapscene.cpp
+++ b/src/location/maps/qgeotiledmapscene.cpp
@@ -557,6 +557,7 @@ void QGeoTiledMapRootNode::updateTiles(QGeoTiledMapTileContainerNode *root,
delete root->tiles.take(s);
bool straight = !d->isTiltedOrRotated();
+ qreal pixelRatio = window->effectiveDevicePixelRatio();
for (QHash<QGeoTileSpec, QSGImageNode *>::iterator it = root->tiles.begin();
it != root->tiles.end(); ) {
QSGImageNode *node = it.value();
@@ -570,7 +571,7 @@ void QGeoTiledMapRootNode::updateTiles(QGeoTiledMapTileContainerNode *root,
delete node;
} else {
if (isTextureLinear != d->m_linearScaling) {
- if (node->texture()->textureSize().width() > d->m_tileSize) {
+ if (node->texture()->textureSize().width() > d->m_tileSize * pixelRatio) {
node->setFiltering(QSGTexture::Linear); // With mipmapping QSGTexture::Nearest generates artifacts
node->setMipmapFiltering(QSGTexture::Linear);
} else {
@@ -595,7 +596,7 @@ void QGeoTiledMapRootNode::updateTiles(QGeoTiledMapTileContainerNode *root,
tileNode->setTexture(textures.value(s));
if (d->buildGeometry(s, tileNode)
&& qgeotiledmapscene_isTileInViewport(tileNode->rect(), root->matrix(), straight)) {
- if (tileNode->texture()->textureSize().width() > d->m_tileSize) {
+ if (tileNode->texture()->textureSize().width() > d->m_tileSize * pixelRatio) {
tileNode->setFiltering(QSGTexture::Linear); // with mipmapping QSGTexture::Nearest generates artifacts
tileNode->setMipmapFiltering(QSGTexture::Linear);
} else {