From 591af0021bfb8b9fdfd803b55fb6c18a24c46943 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 30 May 2017 13:40:36 -0700 Subject: [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 --- src/mbgl/style/layers/symbol_layer_impl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mbgl/style/layers/symbol_layer_impl.cpp') 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(&other)); + const auto& impl = static_cast(other); + return filter != impl.filter || + visibility != impl.visibility || + layout != impl.layout || + paint.hasDataDrivenPropertyDifference(impl.paint); +} + } // namespace style } // namespace mbgl -- cgit v1.2.1