summaryrefslogtreecommitdiff
path: root/src/mbgl
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-08-23 16:30:33 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-08-25 23:41:52 +0300
commitf3fc9b2b923113b10d7ec97531865e625c44fa54 (patch)
tree1a4aba9f148c978f1bdb64af126641ceaff316f3 /src/mbgl
parent9fd03a3e90020fbd9c762ebf489784c06fa187b6 (diff)
downloadqtlocation-mapboxgl-f3fc9b2b923113b10d7ec97531865e625c44fa54.tar.gz
[core] Don't throttle placement in still mode
Diffstat (limited to 'src/mbgl')
-rw-r--r--src/mbgl/tile/geometry_tile.cpp9
-rw-r--r--src/mbgl/tile/geometry_tile.hpp1
2 files changed, 8 insertions, 2 deletions
diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp
index 0e3c4c0476..a3ccd86479 100644
--- a/src/mbgl/tile/geometry_tile.cpp
+++ b/src/mbgl/tile/geometry_tile.cpp
@@ -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() {
diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp
index 5aac3a63a6..7d70e1cb9a 100644
--- a/src/mbgl/tile/geometry_tile.hpp
+++ b/src/mbgl/tile/geometry_tile.hpp
@@ -142,6 +142,7 @@ private:
util::Throttler placementThrottler;
float lastYStretch;
+ const MapMode mode;
public:
optional<gl::Texture> glyphAtlasTexture;