[core] always add labels to buffers in MapMode::Still

To minimize label clipping.
This commit is contained in:
Mike Morris
2015-10-27 17:46:19 -04:00
committed by Ansis Brammanis
parent 9d6cb1361c
commit dc1630f50d
11 changed files with 33 additions and 12 deletions

View File

@@ -330,6 +330,7 @@ TileData::State Source::addTile(const TileID& id, const StyleUpdateParameters& p
std::move(monitor),
info.source_id,
parameters.style,
parameters.mode,
callback);
}

View File

@@ -21,13 +21,15 @@ TileWorker::TileWorker(TileID id_,
SpriteStore& spriteStore_,
GlyphAtlas& glyphAtlas_,
GlyphStore& glyphStore_,
const std::atomic<TileData::State>& state_)
const std::atomic<TileData::State>& state_,
const MapMode mode_)
: id(id_),
sourceID(std::move(sourceID_)),
spriteStore(spriteStore_),
glyphAtlas(glyphAtlas_),
glyphStore(glyphStore_),
state(state_) {
state(state_),
mode(mode_) {
}
TileWorker::~TileWorker() {
@@ -140,7 +142,8 @@ void TileWorker::parseLayer(const StyleLayer* layer, const GeometryTile& geometr
spriteStore,
glyphAtlas,
glyphStore,
*collisionTile);
*collisionTile,
mode);
std::unique_ptr<Bucket> bucket = layer->createBucket(parameters);

View File

@@ -3,6 +3,7 @@
#include <mapbox/variant.hpp>
#include <mbgl/map/mode.hpp>
#include <mbgl/map/tile_data.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/ptr.hpp>
@@ -44,7 +45,8 @@ public:
SpriteStore&,
GlyphAtlas&,
GlyphStore&,
const std::atomic<TileData::State>&);
const std::atomic<TileData::State>&,
const MapMode);
~TileWorker();
TileParseResult parseAllLayers(std::vector<std::unique_ptr<StyleLayer>>,
@@ -67,6 +69,7 @@ private:
GlyphAtlas& glyphAtlas;
GlyphStore& glyphStore;
const std::atomic<TileData::State>& state;
const MapMode mode;
bool partialParse = false;

View File

@@ -12,6 +12,7 @@ VectorTileData::VectorTileData(const TileID& id_,
std::unique_ptr<GeometryTileMonitor> monitor_,
std::string sourceID,
Style& style_,
const MapMode mode_,
const std::function<void()>& callback)
: TileData(id_),
style(style_),
@@ -21,7 +22,8 @@ VectorTileData::VectorTileData(const TileID& id_,
*style_.spriteStore,
*style_.glyphAtlas,
*style_.glyphStore,
state),
state,
mode_),
monitor(std::move(monitor_))
{
state = State::loading;

View File

@@ -22,6 +22,7 @@ public:
std::unique_ptr<GeometryTileMonitor> monitor,
std::string sourceID,
Style&,
const MapMode,
const std::function<void()>& callback);
~VectorTileData();