diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-05-30 13:40:36 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-06-05 19:38:08 -0700 |
commit | 591af0021bfb8b9fdfd803b55fb6c18a24c46943 (patch) | |
tree | b0952184aca90ddda6ce170c4e2cc287824fbf54 /src/mbgl/style/layers/symbol_layer_impl.cpp | |
parent | 32589c271c6f4885dadb6291c4bf637b72659a9f (diff) | |
download | qtlocation-mapboxgl-591af0021bfb8b9fdfd803b55fb6c18a24c46943.tar.gz |
[core] Refactor RenderSource updates
* Eliminate updateBatch in favor of diffing layers and detecting changes to properties upon which layout depends.
* Replace RenderSource::{update,remove,invalidate,reload}Tiles with a single update method
* Replace TilePyramid::{update,remove,invalidate,reload}Tiles with a single update method
* Remove Style& dependency TODO from GeometryTile and TileParameters
Diffstat (limited to 'src/mbgl/style/layers/symbol_layer_impl.cpp')
-rw-r--r-- | src/mbgl/style/layers/symbol_layer_impl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mbgl/style/layers/symbol_layer_impl.cpp b/src/mbgl/style/layers/symbol_layer_impl.cpp index 3f0ab9b8fb..b59768725d 100644 --- a/src/mbgl/style/layers/symbol_layer_impl.cpp +++ b/src/mbgl/style/layers/symbol_layer_impl.cpp @@ -3,5 +3,14 @@ namespace mbgl { namespace style { +bool SymbolLayer::Impl::hasLayoutDifference(const Layer::Impl& other) const { + assert(dynamic_cast<const SymbolLayer::Impl*>(&other)); + const auto& impl = static_cast<const style::SymbolLayer::Impl&>(other); + return filter != impl.filter || + visibility != impl.visibility || + layout != impl.layout || + paint.hasDataDrivenPropertyDifference(impl.paint); +} + } // namespace style } // namespace mbgl |