From 016c7d3a4fa4412aef3f249c93d5cb578fca436d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 25 Mar 2014 14:09:36 +0100 Subject: [PATCH] fix text fading preventing render idling fixes #108 --- src/renderer/frame_history.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/frame_history.cpp b/src/renderer/frame_history.cpp index ba0cf56c7..35732223b 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(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