diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-06-27 17:19:53 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-07-02 16:05:09 +0300 |
commit | affb21a61248223c81c18f37fb7e2ae7d0ec76a4 (patch) | |
tree | a7766440e4a14f9ff4e23ee928d5a0ce57d2484f /src/mbgl/tile/tile.hpp | |
parent | c1445913220023fdaf8ec5960eb6cba27c348864 (diff) | |
download | qtlocation-mapboxgl-affb21a61248223c81c18f37fb7e2ae7d0ec76a4.tar.gz |
[core] Geometry tile updates layer render data if its constants mask remains
Thus, we do not have to wait for tile update completion in case
the updated properties have the same constants mask, i.e. fit
the existing bucket.
Diffstat (limited to 'src/mbgl/tile/tile.hpp')
-rw-r--r-- | src/mbgl/tile/tile.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mbgl/tile/tile.hpp b/src/mbgl/tile/tile.hpp index 95ee0bc37e..17a16b4666 100644 --- a/src/mbgl/tile/tile.hpp +++ b/src/mbgl/tile/tile.hpp @@ -58,10 +58,16 @@ public: assert(false); return nullptr; } - // Updates the contained layer render data with the given properties. + // Notifies this tile of the updated layer properties. + // + // Tile implementation should update the contained layer + // render data with the given properties. + // // Returns `true` if the corresponding render layer data is present in this tile (and i.e. it // was succesfully updated); returns `false` otherwise. - virtual bool updateLayerProperties(const Immutable<style::LayerProperties>&) { return true; } + virtual bool layerPropertiesUpdated(const Immutable<style::LayerProperties>& layerProperties) { + return bool(getBucket(*layerProperties->baseImpl)); + } virtual void setShowCollisionBoxes(const bool) {} virtual void setLayers(const std::vector<Immutable<style::LayerProperties>>&) {} virtual void setMask(TileMask&&) {} |