cache: use render job times to synchronize cache

Ensure old inaccurate jobs are never prioritized over current jobs.
This commit is contained in:
itsmattkc
2020-06-04 16:48:23 +10:00
parent cc34f0e251
commit 9ff9817b95
13 changed files with 106 additions and 40 deletions
+11 -2
View File
@@ -80,14 +80,14 @@ signals:
void LengthChanged(const OLIVE_NAMESPACE::rational& r);
protected:
void Validate(const TimeRange& r);
void NoLockInvalidate(const TimeRange& r);
void NoLockValidate(const TimeRange& r);
void NoLockSetLength(const rational& r);
bool JobIsCurrent(const TimeRange& r, qint64 job_time);
const rational& NoLockGetLength() const
{
return length_;
@@ -110,10 +110,19 @@ protected:
}
private:
void RemoveRangeFromJobs(const TimeRange& remove);
QMutex lock_;
TimeRangeList invalidated_;
struct JobIdentifier {
TimeRange range;
qint64 job_time;
};
QList<JobIdentifier> jobs_;
rational length_;
};