diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-03-25 14:09:36 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-03-25 14:09:36 +0100 |
commit | 016c7d3a4fa4412aef3f249c93d5cb578fca436d (patch) | |
tree | 3781890e1f5e4277daf9d0e619262fada7a1cc2a /src/renderer | |
parent | 1250ea1be21115f0ae2b480cd26d651afd8bc082 (diff) | |
download | qtlocation-mapboxgl-016c7d3a4fa4412aef3f249c93d5cb578fca436d.tar.gz |
fix text fading preventing render idling
fixes #108
Diffstat (limited to 'src/renderer')
-rw-r--r-- | src/renderer/frame_history.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/renderer/frame_history.cpp b/src/renderer/frame_history.cpp index ba0cf56c70..35732223bd 100644 --- a/src/renderer/frame_history.cpp +++ b/src/renderer/frame_history.cpp @@ -10,13 +10,13 @@ void FrameHistory::record(float zoom) { history.emplace_back(FrameSnapshot{0.0f, zoom}); } - if (history.size() == 2 || history.back().z != zoom) { + if (history.size() > 0 || history.back().z != zoom) { history.emplace_back(FrameSnapshot{static_cast<float>(platform::time() * 1000), zoom}); } } bool FrameHistory::needsAnimation(const float duration) const { - if (!history.size()) return true; + if (!history.size()) return false; // If we have a value that is older than duration and whose z value is the // same as the most current z value, and if all values inbetween have the |