diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2018-03-07 15:17:16 +0200 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2018-03-14 16:39:58 +0200 |
commit | d7bc36db6f3aa46246bc1aae1c5c63c56b5ce262 (patch) | |
tree | 678bccb6cb9aa47df359126e0a7842a12a258663 /src/mbgl/map | |
parent | 5b3ebc4a2429c202f08c7468c300950de4844615 (diff) | |
download | qtlocation-mapboxgl-d7bc36db6f3aa46246bc1aae1c5c63c56b5ce262.tar.gz |
[core] prevent render thread from waking up unneeded on still rendering
- No longer sends a update message to the render frontend when rendering in still mode only to shortcut it in the renderer. This prevents unneeded render passes in qt.
Diffstat (limited to 'src/mbgl/map')
-rw-r--r-- | src/mbgl/map/map.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 947973415a..525291a628 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -748,6 +748,11 @@ void Map::Impl::onInvalidate() { } void Map::Impl::onUpdate() { + // Don't load/render anything in still mode until explicitly requested. + if (mode != MapMode::Continuous && !stillImageRequest) { + return; + } + TimePoint timePoint = mode == MapMode::Continuous ? Clock::now() : Clock::time_point::max(); transform.updateTransitions(timePoint); |