summaryrefslogtreecommitdiff
path: root/src/mbgl/tile/geometry_tile.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-12-10 13:07:38 +0100
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2020-01-15 15:02:11 +0200
commit7d8d13ce04710d1eb5687c143ab466fcf8ee6c84 (patch)
tree339a5b2bda8538e1725f1323f0e68ac06f587ebf /src/mbgl/tile/geometry_tile.cpp
parentc80baa35b3e03bd0ef795e54bb6a83641627e9b0 (diff)
downloadqtlocation-mapboxgl-7d8d13ce04710d1eb5687c143ab466fcf8ee6c84.tar.gz
[core] Change ImagePosition from storing non-padded rect to padded rect to mirror the JS implementation
Diffstat (limited to 'src/mbgl/tile/geometry_tile.cpp')
-rw-r--r--src/mbgl/tile/geometry_tile.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp
index 67e4459104..04ee5f9df7 100644
--- a/src/mbgl/tile/geometry_tile.cpp
+++ b/src/mbgl/tile/geometry_tile.cpp
@@ -99,7 +99,10 @@ void GeometryTileRenderData::upload(gfx::UploadPass& uploadPass) {
if (atlasTextures->icon && !imagePatches.empty()) {
for (const auto& imagePatch : imagePatches) { // patch updated images.
- uploadPass.updateTextureSub(*atlasTextures->icon, imagePatch.image->image, imagePatch.textureRect.x, imagePatch.textureRect.y);
+ uploadPass.updateTextureSub(*atlasTextures->icon,
+ imagePatch.image->image,
+ imagePatch.paddedRect.x + ImagePosition::padding,
+ imagePatch.paddedRect.y + ImagePosition::padding);
}
imagePatches.clear();
}