summaryrefslogtreecommitdiff
path: root/src/mbgl/annotation
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-12-11 13:41:23 +0200
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2018-12-11 15:09:34 +0200
commitc043d01e14900461935ebee490fd93e492c5e7ae (patch)
tree2ba2552cc0ce1f6a8160f48cd62d6e7762164348 /src/mbgl/annotation
parentebd87a5442772e9e840cd5c00be56cccfddb5c68 (diff)
downloadqtlocation-mapboxgl-c043d01e14900461935ebee490fd93e492c5e7ae.tar.gz
[core]Disable RenderAnnotationSource when annotations are disabled
This patch disables creation of `RenderAnnotationSource` instances and thus saves extra 4Ki on Android when `LayerManager::annotationsEnabled` is `false`.
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r--src/mbgl/annotation/render_annotation_source.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mbgl/annotation/render_annotation_source.cpp b/src/mbgl/annotation/render_annotation_source.cpp
index 7d776f21c4..d83f4d0fa4 100644
--- a/src/mbgl/annotation/render_annotation_source.cpp
+++ b/src/mbgl/annotation/render_annotation_source.cpp
@@ -6,12 +6,15 @@
#include <mbgl/algorithm/generate_clip_ids.hpp>
#include <mbgl/algorithm/generate_clip_ids_impl.hpp>
+#include <mbgl/layermanager/layer_manager.hpp>
+
namespace mbgl {
using namespace style;
RenderAnnotationSource::RenderAnnotationSource(Immutable<AnnotationSource::Impl> impl_)
: RenderSource(impl_) {
+ assert(LayerManager::annotationsEnabled);
tilePyramid.setObserver(this);
}