diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-11-13 15:29:03 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@gmail.com> | 2017-11-13 15:29:03 -0800 |
commit | 6a8c9d253648940c41d9a48a597b6f131a6a31da (patch) | |
tree | 7265163d11b685ad1baceb73055904cbee329315 | |
parent | 10938f0f967a7aaece7bc0f234bc79cfedde9ba4 (diff) | |
download | qtlocation-mapboxgl-upstream/viewport-collision-jfire-review.tar.gz |
CrossTileSymbolIndex doesn't need to be wrapped in unique_ptrupstream/viewport-collision-jfire-review
-rw-r--r-- | src/mbgl/renderer/renderer_impl.cpp | 6 | ||||
-rw-r--r-- | 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 <mbgl/style/source_impl.hpp> #include <mbgl/style/transition_options.hpp> #include <mbgl/text/glyph_manager.hpp> -#include <mbgl/text/cross_tile_symbol_index.hpp> #include <mbgl/tile/tile.hpp> #include <mbgl/util/math.hpp> #include <mbgl/util/string.hpp> @@ -58,7 +57,6 @@ Renderer::Impl::Impl(RendererBackend& backend_, , sourceImpls(makeMutable<std::vector<Immutable<style::Source::Impl>>>()) , layerImpls(makeMutable<std::vector<Immutable<style::Layer::Impl>>>()) , renderLight(makeMutable<Light::Impl>()) - , crossTileSymbolIndex(std::make_unique<CrossTileSymbolIndex>()) , placement(std::make_unique<Placement>(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<RenderSymbolLayer>()) { - if (crossTileSymbolIndex->addLayer(*it->layer.as<RenderSymbolLayer>())) symbolBucketsChanged = true; + if (crossTileSymbolIndex.addLayer(*it->layer.as<RenderSymbolLayer>())) 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 <mbgl/style/layer.hpp> #include <mbgl/map/transform_state.hpp> #include <mbgl/map/zoom_history.hpp> +#include <mbgl/text/cross_tile_symbol_index.hpp> #include <mbgl/text/glyph_manager_observer.hpp> #include <mbgl/text/placement.hpp> @@ -105,7 +106,7 @@ private: std::unordered_map<std::string, std::unique_ptr<RenderLayer>> renderLayers; RenderLight renderLight; - std::unique_ptr<CrossTileSymbolIndex> crossTileSymbolIndex; + CrossTileSymbolIndex crossTileSymbolIndex; std::unique_ptr<Placement> placement; bool contextLost = false; |