diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2018-03-07 15:17:16 +0200 |
---|---|---|
committer | Ivo van Dongen <info@ivovandongen.nl> | 2018-03-07 15:17:16 +0200 |
commit | ba5d686268fd6364f186b89b5cea7796bcbcfd63 (patch) | |
tree | 34cf545ea4bcd39cee63cf65cf8bd0d2d5cddb17 | |
parent | d7808b3a77bce6d2c8221ea624ef5b78616b760c (diff) | |
download | qtlocation-mapboxgl-upstream/ivd-shortcut-static-rendering.tar.gz |
[core] prevent render thread from waking up unneeded on still renderingupstream/ivd-shortcut-static-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.
-rw-r--r-- | src/mbgl/map/map.cpp | 5 | ||||
-rw-r--r-- | src/mbgl/renderer/renderer_impl.cpp | 5 |
2 files changed, 5 insertions, 5 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); diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp index 2ac714e122..962a6571db 100644 --- a/src/mbgl/renderer/renderer_impl.cpp +++ b/src/mbgl/renderer/renderer_impl.cpp @@ -85,11 +85,6 @@ void Renderer::Impl::setObserver(RendererObserver* observer_) { void Renderer::Impl::render(const UpdateParameters& updateParameters) { if (updateParameters.mode != MapMode::Continuous) { - // Don't load/render anyting in still mode until explicitly requested. - if (!updateParameters.stillImageRequest) { - return; - } - // Reset zoom history state. zoomHistory.first = true; } |