[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.
This commit is contained in:
Ivo van Dongen
2018-03-07 15:17:16 +02:00
committed by Ivo van Dongen
parent 5b3ebc4a24
commit d7bc36db6f
2 changed files with 5 additions and 5 deletions

View File

@@ -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);

View File

@@ -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;
}