diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-12-10 13:07:38 +0100 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-01-15 15:02:11 +0200 |
commit | 7d8d13ce04710d1eb5687c143ab466fcf8ee6c84 (patch) | |
tree | 339a5b2bda8538e1725f1323f0e68ac06f587ebf /src/mbgl/tile | |
parent | c80baa35b3e03bd0ef795e54bb6a83641627e9b0 (diff) | |
download | qtlocation-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')
-rw-r--r-- | src/mbgl/tile/geometry_tile.cpp | 5 |
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(); } |