cache: use render job times to synchronize cache
Ensure old inaccurate jobs are never prioritized over current jobs.
This commit is contained in:
@@ -41,10 +41,14 @@ QByteArray FrameHashCache::GetHash(const rational &time)
|
||||
return time_hash_map_.value(time);
|
||||
}
|
||||
|
||||
void FrameHashCache::SetHash(const rational &time, const QByteArray &hash)
|
||||
void FrameHashCache::SetHash(const rational &time, const QByteArray &hash, const qint64& job_time)
|
||||
{
|
||||
QMutexLocker locker(lock());
|
||||
|
||||
if (!JobIsCurrent(TimeRange(time, time), job_time)) {
|
||||
return;
|
||||
}
|
||||
|
||||
time_hash_map_.insert(time, hash);
|
||||
|
||||
TimeRange validated_range(time, time + timebase_);
|
||||
|
||||
Reference in New Issue
Block a user