From 6a8c9d253648940c41d9a48a597b6f131a6a31da Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Mon, 13 Nov 2017 15:29:03 -0800 Subject: CrossTileSymbolIndex doesn't need to be wrapped in unique_ptr --- src/mbgl/renderer/renderer_impl.cpp | 6 ++---- src/mbgl/renderer/renderer_impl.hpp | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp index d322d49230..d0cc6fe543 100644 --- a/src/mbgl/renderer/renderer_impl.cpp +++ b/src/mbgl/renderer/renderer_impl.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -58,7 +57,6 @@ Renderer::Impl::Impl(RendererBackend& backend_, , sourceImpls(makeMutable>>()) , layerImpls(makeMutable>>()) , renderLight(makeMutable()) - , crossTileSymbolIndex(std::make_unique()) , placement(std::make_unique(TransformState{}, MapMode::Static)) { glyphManager->setObserver(this); } @@ -368,11 +366,11 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) { bool symbolBucketsChanged = false; if (parameters.mapMode != MapMode::Continuous) { // TODO: Think about right way for symbol index to handle still rendering - crossTileSymbolIndex->reset(); + crossTileSymbolIndex.reset(); } for (auto it = order.rbegin(); it != order.rend(); ++it) { if (it->layer.is()) { - if (crossTileSymbolIndex->addLayer(*it->layer.as())) symbolBucketsChanged = true; + if (crossTileSymbolIndex.addLayer(*it->layer.as())) symbolBucketsChanged = true; } } diff --git a/src/mbgl/renderer/renderer_impl.hpp b/src/mbgl/renderer/renderer_impl.hpp index fdcbac9150..83c1d59c23 100644 --- a/src/mbgl/renderer/renderer_impl.hpp +++ b/src/mbgl/renderer/renderer_impl.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -105,7 +106,7 @@ private: std::unordered_map> renderLayers; RenderLight renderLight; - std::unique_ptr crossTileSymbolIndex; + CrossTileSymbolIndex crossTileSymbolIndex; std::unique_ptr placement; bool contextLost = false; -- cgit v1.2.1