fix text fading preventing render idling

fixes #108
This commit is contained in:
Konstantin Käfer
2014-03-25 14:09:36 +01:00
parent 1250ea1be2
commit 016c7d3a4f

View File

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