diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-06-07 16:49:11 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-06-13 10:18:43 -0700 |
commit | f610e9bef969dc8d7ec1ea545e93919a03d98882 (patch) | |
tree | 43576df80df4bb6868c60459e3010a53871148dc | |
parent | 0b687312071305c050d97e04fef1c80193f443c5 (diff) | |
download | qtlocation-mapboxgl-f610e9bef969dc8d7ec1ea545e93919a03d98882.tar.gz |
[tests] Test updating icon and pattern images
m--------- | mapbox-gl-js | 0 | ||||
-rw-r--r-- | platform/node/test/suite_implementation.js | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/render_style.cpp | 5 |
3 files changed, 5 insertions, 2 deletions
diff --git a/mapbox-gl-js b/mapbox-gl-js -Subproject 943dc3917b28ec8712d08afbcc1ef9a277c6c93 +Subproject 0ee15860e3ffb25a535ae374f44b3007b765c6f diff --git a/platform/node/test/suite_implementation.js b/platform/node/test/suite_implementation.js index 8ac372b7c3..cae5d12157 100644 --- a/platform/node/test/suite_implementation.js +++ b/platform/node/test/suite_implementation.js @@ -70,7 +70,7 @@ module.exports = function (style, options, callback) { applyOperations(operations.slice(1), callback); }); - } else if (operation[0] === 'addImage') { + } else if (operation[0] === 'addImage' || operation[0] === 'updateImage') { var img = PNG.sync.read(fs.readFileSync(path.join(__dirname, '../../../mapbox-gl-js/test/integration', operation[2]))); map.addImage(operation[1], img.data, { diff --git a/src/mbgl/renderer/render_style.cpp b/src/mbgl/renderer/render_style.cpp index f76d1f48d8..9b0b512bf9 100644 --- a/src/mbgl/renderer/render_style.cpp +++ b/src/mbgl/renderer/render_style.cpp @@ -207,7 +207,10 @@ void RenderStyle::update(const UpdateParameters& parameters) { needsRendering = true; } - if (hasLayoutDifference(layerDiff, layer->id) || !imageDiff.changed.empty()) { + if (hasLayoutDifference(layerDiff, layer->id) || + !imageDiff.added.empty() || + !imageDiff.removed.empty() || + !imageDiff.changed.empty()) { needsRelayout = true; } |