summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/renderer_impl.hpp
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2017-11-09 13:24:43 -0800
committerChris Loer <chris.loer@mapbox.com>2017-11-17 10:05:15 -0800
commitc0cb210ddca1901a956cd68e9142b7fb04183248 (patch)
tree7a6d5dc3d79720b930d5669d16d5912239fcc344 /src/mbgl/renderer/renderer_impl.hpp
parent9a5b2fdfc362e7041a10d5066161b51aedbb0a31 (diff)
downloadqtlocation-mapboxgl-c0cb210ddca1901a956cd68e9142b7fb04183248.tar.gz
[core] Switch from background to foreground placement
- Background placement code now just generates static symbol buffers - Don't render GeometryTiles until their symbols are loaded. This is necessary for the CrossTileSymbolIndex to successfully prevent flicker. - SymbolInstances are transferred to SymbolBucket for use on foreground during collision detection - Symbols are sorted on foreground by sorting their index buffer but leaving vertex buffers intact (only works within one segment) - Vertical glyphs are generated at same time as horizontal glyphs. `reprojectLineLabels` chooses which one to use at render time and hides the other. - Icons are now always represented with a single collision box, even if they're placed along a line (this means their rotation alignment may be wrong, but the approach of representing them with multiple collision boxes wasn't very accurate either). - Generate vertices for new debug collision boxes and collision circles - Only add symbols within tile boundaries (reduces work, avoids double-draw) - Update symbol_projection.cpp to support line label projection calls from CollisionIndex.
Diffstat (limited to 'src/mbgl/renderer/renderer_impl.hpp')
-rw-r--r--src/mbgl/renderer/renderer_impl.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mbgl/renderer/renderer_impl.hpp b/src/mbgl/renderer/renderer_impl.hpp
index 720e01ed53..e4cc893d07 100644
--- a/src/mbgl/renderer/renderer_impl.hpp
+++ b/src/mbgl/renderer/renderer_impl.hpp
@@ -11,6 +11,7 @@
#include <mbgl/map/transform_state.hpp>
#include <mbgl/map/zoom_history.hpp>
#include <mbgl/text/glyph_manager_observer.hpp>
+#include <mbgl/text/placement.hpp>
#include <memory>
#include <string>
@@ -31,6 +32,7 @@ class Scheduler;
class GlyphManager;
class ImageManager;
class LineAtlas;
+class CrossTileSymbolIndex;
class Renderer::Impl : public GlyphManagerObserver,
public RenderSourceObserver{
@@ -56,7 +58,7 @@ public:
private:
bool isLoaded() const;
- bool hasTransitions() const;
+ bool hasTransitions(TimePoint) const;
RenderSource* getRenderSource(const std::string& id) const;
@@ -108,6 +110,9 @@ private:
std::unordered_map<std::string, std::unique_ptr<RenderLayer>> renderLayers;
RenderLight renderLight;
+ std::unique_ptr<CrossTileSymbolIndex> crossTileSymbolIndex;
+ std::unique_ptr<Placement> placement;
+
bool contextLost = false;
};