diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-08-23 16:30:33 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2017-08-25 23:41:52 +0300 |
commit | f3fc9b2b923113b10d7ec97531865e625c44fa54 (patch) | |
tree | 1a4aba9f148c978f1bdb64af126641ceaff316f3 /src/mbgl | |
parent | 9fd03a3e90020fbd9c762ebf489784c06fa187b6 (diff) | |
download | qtlocation-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.cpp | 9 | ||||
-rw-r--r-- | src/mbgl/tile/geometry_tile.hpp | 1 |
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; |