diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-09-13 11:07:38 -0400 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-09-13 12:30:25 -0400 |
commit | a647b42712bec653ba41f8ffadbc412c6363e6ef (patch) | |
tree | bffc3e443fe72c9ceed786d66b6b61d9ad1937ee | |
parent | 366a69785a2fffd0713897f53647cf18b7a0c645 (diff) | |
download | qtlocation-mapboxgl-upstream/fix-9976.tar.gz |
[core] Clear atlasImage rect for a removed patternupstream/fix-9976
m--------- | mapbox-gl-js | 0 | ||||
-rw-r--r-- | platform/node/test/ignores.json | 1 | ||||
-rw-r--r-- | src/mbgl/renderer/image_manager.cpp | 8 |
3 files changed, 9 insertions, 0 deletions
diff --git a/mapbox-gl-js b/mapbox-gl-js -Subproject 991ab7d1a190a5a54e1f8f54e179dd302ecae49 +Subproject c346dec5e3b55257820f1377a139579982bc95f diff --git a/platform/node/test/ignores.json b/platform/node/test/ignores.json index a8f5a1c7b1..a6e43da0b3 100644 --- a/platform/node/test/ignores.json +++ b/platform/node/test/ignores.json @@ -41,6 +41,7 @@ "render-tests/regressions/mapbox-gl-js#3548": "skip - needs issue", "render-tests/regressions/mapbox-gl-js#3682": "https://github.com/mapbox/mapbox-gl-js/issues/3682", "render-tests/regressions/mapbox-gl-native#7357": "https://github.com/mapbox/mapbox-gl-native/issues/7357", + "render-tests/regressions/mapbox-gl-native#9900": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9905", "render-tests/runtime-styling/image-add-sdf": "skip - https://github.com/mapbox/mapbox-gl-native/issues/9847", "render-tests/runtime-styling/paint-property-fill-flat-to-extrude": "skip - https://github.com/mapbox/mapbox-gl-native/issues/6745", "render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude": "skip - needs issue", diff --git a/src/mbgl/renderer/image_manager.cpp b/src/mbgl/renderer/image_manager.cpp index 365a2742de..4aa18e693a 100644 --- a/src/mbgl/renderer/image_manager.cpp +++ b/src/mbgl/renderer/image_manager.cpp @@ -39,6 +39,14 @@ void ImageManager::removeImage(const std::string& id) { auto it = patterns.find(id); if (it != patterns.end()) { + // Clear pattern from the atlas image. + const uint32_t w = it->second.bin->w; + const uint32_t h = it->second.bin->h; + const uint32_t x = it->second.bin->x; + const uint32_t y = it->second.bin->y; + PremultipliedImage blank { Size { w, h } }; + PremultipliedImage::copy(blank, atlasImage, { 0, 0 }, { x, y }, { w, h }); + shelfPack.unref(*it->second.bin); patterns.erase(it); } |