[core] Don't throttle placement in still mode

This commit is contained in:
Bruno de Oliveira Abinader
2017-08-23 16:30:33 +03:00
parent 9fd03a3e90
commit f3fc9b2b92
2 changed files with 8 additions and 2 deletions

View File

@@ -43,7 +43,8 @@ GeometryTile::GeometryTile(const OverscaledTileID& id_,
glyphManager(parameters.glyphManager),
imageManager(parameters.imageManager),
placementThrottler(Milliseconds(300), [this] { invokePlacement(); }),
lastYStretch(1.0f) {
lastYStretch(1.0f),
mode(parameters.mode) {
}
GeometryTile::~GeometryTile() {
@@ -86,7 +87,11 @@ void GeometryTile::setPlacementConfig(const PlacementConfig& desiredConfig) {
++correlationID;
requestedConfig = desiredConfig;
placementThrottler.invoke();
if (mode == MapMode::Continuous) {
placementThrottler.invoke();
} else {
invokePlacement();
}
}
void GeometryTile::invokePlacement() {

View File

@@ -142,6 +142,7 @@ private:
util::Throttler placementThrottler;
float lastYStretch;
const MapMode mode;
public:
optional<gl::Texture> glyphAtlasTexture;