ensure cache modified time is accurate
This commit is contained in:
@@ -54,7 +54,7 @@ QString ClipBlock::Description() const
|
||||
return tr("A time-based node that represents a media source.");
|
||||
}
|
||||
|
||||
void ClipBlock::InvalidateCache(const TimeRange& range, const QString& from, int element)
|
||||
void ClipBlock::InvalidateCache(const TimeRange& range, const QString& from, int element, qint64 job_time)
|
||||
{
|
||||
Q_UNUSED(element)
|
||||
|
||||
@@ -64,10 +64,10 @@ void ClipBlock::InvalidateCache(const TimeRange& range, const QString& from, int
|
||||
rational start = MediaToSequenceTime(range.in());
|
||||
rational end = MediaToSequenceTime(range.out());
|
||||
|
||||
Block::InvalidateCache(TimeRange(start, end), from);
|
||||
Block::InvalidateCache(TimeRange(start, end), from, element, job_time);
|
||||
} else {
|
||||
// Otherwise, pass signal along normally
|
||||
Block::InvalidateCache(range, from);
|
||||
Block::InvalidateCache(range, from, element, job_time);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
virtual QString id() const override;
|
||||
virtual QString Description() const override;
|
||||
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1) override;
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element, qint64 job_time) override;
|
||||
|
||||
virtual TimeRange InputTimeAdjustment(const QString& input, int element, const TimeRange& input_time) const override;
|
||||
|
||||
|
||||
+19
-5
@@ -45,7 +45,8 @@ const QString Node::kDefaultOutput = QStringLiteral("output");
|
||||
|
||||
Node::Node(bool create_default_output) :
|
||||
can_be_deleted_(true),
|
||||
override_color_(-1)
|
||||
override_color_(-1),
|
||||
last_change_time_(0)
|
||||
{
|
||||
if (create_default_output) {
|
||||
AddOutput();
|
||||
@@ -274,6 +275,9 @@ void Node::ConnectEdge(const NodeOutput &output, const NodeInput &input)
|
||||
input.node()->input_connections_[input] = output;
|
||||
output.node()->output_connections_.push_back(std::pair<NodeOutput, NodeInput>({output, input}));
|
||||
|
||||
// Update change times
|
||||
input.node()->UpdateLastChangedTime();
|
||||
|
||||
// Call internal events
|
||||
input.node()->InputConnectedEvent(input.input(), input.element(), output);
|
||||
output.node()->OutputConnectedEvent(output.output(), input);
|
||||
@@ -303,6 +307,9 @@ void Node::DisconnectEdge(const NodeOutput &output, const NodeInput &input)
|
||||
OutputConnections& outputs = output.node()->output_connections_;
|
||||
outputs.erase(std::find(outputs.begin(), outputs.end(), std::pair<NodeOutput, NodeInput>({output, input})));
|
||||
|
||||
// Update change times
|
||||
input.node()->UpdateLastChangedTime();
|
||||
|
||||
// Call internal events
|
||||
input.node()->InputDisconnectedEvent(input.input(), input.element(), output);
|
||||
output.node()->OutputDisconnectedEvent(output.output(), input);
|
||||
@@ -1005,12 +1012,12 @@ NodeValueTable Node::Value(const QString& output, NodeValueDatabase &value) cons
|
||||
return value.Merge();
|
||||
}
|
||||
|
||||
void Node::InvalidateCache(const TimeRange &range, const QString &from, int element)
|
||||
void Node::InvalidateCache(const TimeRange &range, const QString &from, int element, qint64 job_time)
|
||||
{
|
||||
Q_UNUSED(from)
|
||||
Q_UNUSED(element)
|
||||
|
||||
SendInvalidateCache(range);
|
||||
SendInvalidateCache(range, job_time);
|
||||
}
|
||||
|
||||
void Node::BeginOperation()
|
||||
@@ -1098,13 +1105,13 @@ void Node::CopyDependencyGraph(const QVector<Node *> &src, const QVector<Node *>
|
||||
}
|
||||
}
|
||||
|
||||
void Node::SendInvalidateCache(const TimeRange &range)
|
||||
void Node::SendInvalidateCache(const TimeRange &range, qint64 job_time)
|
||||
{
|
||||
for (const OutputConnection& conn : output_connections_) {
|
||||
// Send clear cache signal to the Node
|
||||
const NodeInput& in = conn.second;
|
||||
|
||||
in.node()->InvalidateCache(range, in.input(), in.element());
|
||||
in.node()->InvalidateCache(range, in.input(), in.element(), job_time);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1739,6 +1746,8 @@ void Node::SetPosition(const QPointF &pos)
|
||||
|
||||
void Node::ParameterValueChanged(const QString& input, int element, const TimeRange& range)
|
||||
{
|
||||
UpdateLastChangedTime();
|
||||
|
||||
InputValueChangedEvent(input, element);
|
||||
|
||||
emit ValueChanged(NodeInput(this, input, element), range);
|
||||
@@ -1928,6 +1937,11 @@ void Node::SaveImmediate(QXmlStreamWriter *writer, const QString& input, int ele
|
||||
}
|
||||
}
|
||||
|
||||
void Node::UpdateLastChangedTime()
|
||||
{
|
||||
last_change_time_ = QDateTime::currentMSecsSinceEpoch();
|
||||
}
|
||||
|
||||
TimeRange Node::GetRangeAffectedByKeyframe(NodeKeyframe *key) const
|
||||
{
|
||||
const NodeKeyframeTrack& key_track = GetTrackFromKeyframe(key);
|
||||
|
||||
+12
-2
@@ -597,7 +597,13 @@ public:
|
||||
* the DAG. Even if the time needs to be transformed somehow (e.g. converting media time to sequence time), you can
|
||||
* call this function with transformed time and relay the signal that way.
|
||||
*/
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1);
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element, qint64 job_time);
|
||||
|
||||
void InvalidateCache(const TimeRange& range, const QString& from, int element = -1)
|
||||
{
|
||||
InvalidateCache(range, from, element, last_change_time_);
|
||||
}
|
||||
|
||||
void InvalidateCache(const TimeRange& range, const NodeInput& from)
|
||||
{
|
||||
InvalidateCache(range, from.input(), from.element());
|
||||
@@ -760,7 +766,7 @@ protected:
|
||||
SetInputProperty(id, QStringLiteral("combo_str"), strings);
|
||||
}
|
||||
|
||||
void SendInvalidateCache(const TimeRange &range);
|
||||
void SendInvalidateCache(const TimeRange &range, qint64 job_time);
|
||||
|
||||
/**
|
||||
* @brief Don't send cache invalidation signals if `input` is connected or disconnected
|
||||
@@ -1067,6 +1073,8 @@ private:
|
||||
|
||||
void SaveImmediate(QXmlStreamWriter *writer, const QString &input, int element) const;
|
||||
|
||||
void UpdateLastChangedTime();
|
||||
|
||||
/**
|
||||
* @brief Intelligently determine how what time range is affected by a keyframe
|
||||
*/
|
||||
@@ -1121,6 +1129,8 @@ private:
|
||||
|
||||
OutputConnections output_connections_;
|
||||
|
||||
qint64 last_change_time_;
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* @brief Slot when a keyframe's time changes to keep the keyframes correctly sorted by time
|
||||
|
||||
@@ -222,7 +222,7 @@ void Track::InputConnectedEvent(const QString &input, int element, const NodeOut
|
||||
connect(block, &Block::LengthChanged, this, &Track::BlockLengthChanged);
|
||||
|
||||
// Invalidate cache now that block should have an in point
|
||||
InvalidateCache(TimeRange(block->in(), track_length()));
|
||||
Node::InvalidateCache(TimeRange(block->in(), track_length()), kBlockInput);
|
||||
|
||||
// Emit block added signal
|
||||
emit BlockAdded(block);
|
||||
@@ -282,7 +282,7 @@ void Track::InputDisconnectedEvent(const QString &input, int element, const Node
|
||||
|
||||
disconnect(b, &Block::LengthChanged, this, &Track::BlockLengthChanged);
|
||||
|
||||
InvalidateCache(invalidate_range);
|
||||
Node::InvalidateCache(invalidate_range, kBlockInput);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ QVector<Block *> Track::BlocksAtTimeRange(const TimeRange &range) const
|
||||
return list;
|
||||
}
|
||||
|
||||
void Track::InvalidateCache(const TimeRange& range, const QString& from, int element)
|
||||
void Track::InvalidateCache(const TimeRange& range, const QString& from, int element, qint64 job_time)
|
||||
{
|
||||
TimeRange limited;
|
||||
|
||||
@@ -430,11 +430,11 @@ void Track::InvalidateCache(const TimeRange& range, const QString& from, int ele
|
||||
|
||||
limited = TimeRange(qMax(range.in(), b->in()), qMin(range.out(), b->out()));
|
||||
} else {
|
||||
limited = TimeRange(qMax(range.in(), rational(0)), qMin(range.out(), last_invalidated_length_));
|
||||
limited = TimeRange(qMax(range.in(), rational(0)), qMin(range.out(), qMax(last_invalidated_length_, track_length())));
|
||||
last_invalidated_length_ = track_length();
|
||||
}
|
||||
|
||||
Node::InvalidateCache(limited, from);
|
||||
Node::InvalidateCache(limited, from, element, job_time);
|
||||
}
|
||||
|
||||
void Track::InsertBlockBefore(Block* block, Block* after)
|
||||
@@ -473,7 +473,7 @@ void Track::PrependBlock(Block *block)
|
||||
EndOperation();
|
||||
|
||||
// Everything has shifted at this point
|
||||
InvalidateCache(TimeRange(0, track_length()));
|
||||
Node::InvalidateCache(TimeRange(0, track_length()), kBlockInput);
|
||||
}
|
||||
|
||||
void Track::InsertBlockAtIndex(Block *block, int index)
|
||||
@@ -486,7 +486,7 @@ void Track::InsertBlockAtIndex(Block *block, int index)
|
||||
|
||||
EndOperation();
|
||||
|
||||
InvalidateCache(TimeRange(block->in(), track_length()));
|
||||
Node::InvalidateCache(TimeRange(block->in(), track_length()), kBlockInput);
|
||||
}
|
||||
|
||||
void Track::AppendBlock(Block *block)
|
||||
@@ -499,7 +499,7 @@ void Track::AppendBlock(Block *block)
|
||||
EndOperation();
|
||||
|
||||
// Invalidate area that block was added to
|
||||
InvalidateCache(TimeRange(block->in(), track_length()));
|
||||
Node::InvalidateCache(TimeRange(block->in(), track_length()), kBlockInput);
|
||||
}
|
||||
|
||||
void Track::RippleRemoveBlock(Block *block)
|
||||
@@ -513,7 +513,7 @@ void Track::RippleRemoveBlock(Block *block)
|
||||
|
||||
EndOperation();
|
||||
|
||||
InvalidateCache(TimeRange(remove_in, qMax(track_length(), remove_out)));
|
||||
Node::InvalidateCache(TimeRange(remove_in, qMax(track_length(), remove_out)), kBlockInput);
|
||||
}
|
||||
|
||||
void Track::ReplaceBlock(Block *old, Block *replace)
|
||||
@@ -529,9 +529,9 @@ void Track::ReplaceBlock(Block *old, Block *replace)
|
||||
EndOperation();
|
||||
|
||||
if (old->length() == replace->length()) {
|
||||
InvalidateCache(TimeRange(replace->in(), replace->out()));
|
||||
Node::InvalidateCache(TimeRange(replace->in(), replace->out()), kBlockInput);
|
||||
} else {
|
||||
InvalidateCache(TimeRange(replace->in(), RATIONAL_MAX));
|
||||
Node::InvalidateCache(TimeRange(replace->in(), RATIONAL_MAX), kBlockInput);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,7 +638,7 @@ void Track::SetLengthInternal(const rational &r, bool invalidate)
|
||||
emit TrackLengthChanged();
|
||||
|
||||
if (invalidate) {
|
||||
InvalidateCache(invalidate_range);
|
||||
Node::InvalidateCache(invalidate_range, kBlockInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -656,7 +656,7 @@ void Track::BlockLengthChanged()
|
||||
|
||||
TimeRange invalidate_region(qMin(old_out, new_out), track_length());
|
||||
|
||||
InvalidateCache(invalidate_region);
|
||||
Node::InvalidateCache(invalidate_region, kBlockInput);
|
||||
}
|
||||
|
||||
uint qHash(const Track::Reference &r, uint seed)
|
||||
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
return blocks_;
|
||||
}
|
||||
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from = QString(), int element = -1) override;
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element, qint64 job_time) override;
|
||||
|
||||
/**
|
||||
* @brief Adds Block `block` at the very beginning of the Sequence before all other clips
|
||||
|
||||
@@ -315,7 +315,7 @@ void Sequence::ShiftCache(const rational &from, const rational &to)
|
||||
ShiftAudioCache(from, to);
|
||||
}
|
||||
|
||||
void Sequence::InvalidateCache(const TimeRange& range, const QString& from, int element)
|
||||
void Sequence::InvalidateCache(const TimeRange& range, const QString& from, int element, qint64 job_time)
|
||||
{
|
||||
Q_UNUSED(element)
|
||||
|
||||
@@ -326,9 +326,9 @@ void Sequence::InvalidateCache(const TimeRange& range, const QString& from, int
|
||||
|
||||
if (invalidated_range.in() != invalidated_range.out()) {
|
||||
if (from == kTextureInput) {
|
||||
video_frame_cache_.Invalidate(invalidated_range);
|
||||
video_frame_cache_.Invalidate(invalidated_range, job_time);
|
||||
} else {
|
||||
audio_playback_cache_.Invalidate(invalidated_range);
|
||||
audio_playback_cache_.Invalidate(invalidated_range, job_time);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -336,7 +336,7 @@ void Sequence::InvalidateCache(const TimeRange& range, const QString& from, int
|
||||
VerifyLength();
|
||||
}
|
||||
|
||||
super::InvalidateCache(range, from);
|
||||
super::InvalidateCache(range, from, element, job_time);
|
||||
}
|
||||
|
||||
rational Sequence::GetLength()
|
||||
@@ -455,8 +455,6 @@ void Sequence::InputValueChangedEvent(const QString &input, int element)
|
||||
|
||||
emit VideoParamsChanged();
|
||||
|
||||
video_frame_cache_.InvalidateAll();
|
||||
|
||||
cached_video_params_ = video_params();
|
||||
|
||||
} else if (input == kAudioParamsInput) {
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
void ShiftAudioCache(const rational& from, const rational& to);
|
||||
void ShiftCache(const rational& from, const rational& to);
|
||||
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element = -1) override;
|
||||
virtual void InvalidateCache(const TimeRange& range, const QString& from, int element, qint64 job_time) override;
|
||||
|
||||
VideoParams video_params() const
|
||||
{
|
||||
|
||||
@@ -52,9 +52,6 @@ void AudioPlaybackCache::SetParameters(const AudioParams ¶ms)
|
||||
// Restart empty file so there's always "something" to play
|
||||
ClearPlaylist();
|
||||
|
||||
// Our current audio cache is unusable, so we truncate it automatically
|
||||
InvalidateAll();
|
||||
|
||||
emit ParametersChanged();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "diskmanager.h"
|
||||
|
||||
#include <QDataStream>
|
||||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
|
||||
@@ -104,6 +104,7 @@ QList<rational> FrameHashCache::GetFramesWithHash(const QByteArray &hash)
|
||||
|
||||
QList<rational> FrameHashCache::TakeFramesWithHash(const QByteArray &hash)
|
||||
{
|
||||
TimeRangeList range_to_invalidate;
|
||||
QList<rational> times;
|
||||
|
||||
auto iterator = time_hash_map_.begin();
|
||||
@@ -111,6 +112,7 @@ QList<rational> FrameHashCache::TakeFramesWithHash(const QByteArray &hash)
|
||||
while (iterator != time_hash_map_.end()) {
|
||||
if (iterator.value() == hash) {
|
||||
times.append(iterator.key());
|
||||
range_to_invalidate.insert(TimeRange(iterator.key(), iterator.key() + timebase_));
|
||||
|
||||
iterator = time_hash_map_.erase(iterator);
|
||||
} else {
|
||||
@@ -118,8 +120,10 @@ QList<rational> FrameHashCache::TakeFramesWithHash(const QByteArray &hash)
|
||||
}
|
||||
}
|
||||
|
||||
foreach (const rational& r, times) {
|
||||
Invalidate(TimeRange(r, r + timebase_));
|
||||
foreach (const TimeRange& r, range_to_invalidate) {
|
||||
// We apply a 0 job time because the graph hasn't changed to get here, so any renderer should
|
||||
// be up to date already
|
||||
Invalidate(r, 0);
|
||||
}
|
||||
|
||||
return times;
|
||||
@@ -351,7 +355,9 @@ void FrameHashCache::HashDeleted(const QString& s, const QByteArray &hash)
|
||||
}
|
||||
|
||||
foreach (const TimeRange& range, ranges_to_invalidate) {
|
||||
Invalidate(range);
|
||||
// We set job time to 0 because the nodes haven't changed and any render job should be up
|
||||
// to date
|
||||
Invalidate(range, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
|
||||
#include "playbackcache.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
#include "node/output/viewer/viewer.h"
|
||||
#include "project/item/sequence/sequence.h"
|
||||
#include "project/project.h"
|
||||
@@ -29,7 +27,7 @@
|
||||
|
||||
namespace olive {
|
||||
|
||||
void PlaybackCache::Invalidate(const TimeRange &r)
|
||||
void PlaybackCache::Invalidate(const TimeRange &r, qint64 job_time)
|
||||
{
|
||||
if (r.in() == r.out()) {
|
||||
qWarning() << "Tried to invalidate zero-length range";
|
||||
@@ -39,7 +37,6 @@ void PlaybackCache::Invalidate(const TimeRange &r)
|
||||
invalidated_.insert(r);
|
||||
|
||||
RemoveRangeFromJobs(r);
|
||||
qint64 job_time = QDateTime::currentMSecsSinceEpoch();
|
||||
jobs_.append({r, job_time});
|
||||
|
||||
InvalidateEvent(r);
|
||||
@@ -53,7 +50,7 @@ void PlaybackCache::InvalidateAll()
|
||||
return;
|
||||
}
|
||||
|
||||
Invalidate(TimeRange(0, length_));
|
||||
Invalidate(TimeRange(0, length_), 0);
|
||||
}
|
||||
|
||||
void PlaybackCache::SetLength(const rational &r)
|
||||
@@ -73,7 +70,7 @@ void PlaybackCache::SetLength(const rational &r)
|
||||
} else if (r > length_) {
|
||||
// If new length is greater, simply extend the invalidated range for now
|
||||
invalidated_.insert(range_diff);
|
||||
jobs_.append({range_diff, QDateTime::currentMSecsSinceEpoch()});
|
||||
jobs_.append({range_diff, 0});
|
||||
} else {
|
||||
// If new length is smaller, removed hashes
|
||||
invalidated_.remove(range_diff);
|
||||
@@ -108,16 +105,16 @@ void PlaybackCache::Shift(const rational &from, const rational &to)
|
||||
// (`diff` is POSITIVE when moving forward -> and NEGATIVE when moving backward <-)
|
||||
rational diff = to - from;
|
||||
foreach (const TimeRange& r, ranges_to_shift) {
|
||||
Invalidate(r + diff);
|
||||
Invalidate(r + diff, 0);
|
||||
}
|
||||
|
||||
ShiftEvent(from, to);
|
||||
|
||||
length_ += diff;
|
||||
|
||||
if (diff > rational()) {
|
||||
if (diff > 0) {
|
||||
// If shifting forward, add this section to the invalidated region
|
||||
Invalidate(TimeRange(from, to));
|
||||
Invalidate(TimeRange(from, to), 0);
|
||||
}
|
||||
|
||||
// Emit signals
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
QString GetCacheDirectory() const;
|
||||
|
||||
public slots:
|
||||
void Invalidate(const TimeRange& r);
|
||||
void Invalidate(const TimeRange& r, qint64 job_time);
|
||||
|
||||
void InvalidateAll();
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ void PreviewAutoCacher::ProcessUpdateQueue()
|
||||
}
|
||||
graph_update_queue_.clear();
|
||||
|
||||
last_update_time_ = QDateTime::currentMSecsSinceEpoch();
|
||||
UpdateLastSyncedValue();
|
||||
}
|
||||
|
||||
bool PreviewAutoCacher::HasActiveJobs() const
|
||||
@@ -342,6 +342,11 @@ void PreviewAutoCacher::InsertIntoCopyMap(Node *node, Node *copy)
|
||||
Node::CopyInputs(node, copy, false);
|
||||
}
|
||||
|
||||
void PreviewAutoCacher::UpdateLastSyncedValue()
|
||||
{
|
||||
last_update_time_ = QDateTime::currentMSecsSinceEpoch();
|
||||
}
|
||||
|
||||
void PreviewAutoCacher::SetPlayhead(const rational &playhead)
|
||||
{
|
||||
cache_range_ = TimeRange(playhead - Config::Current()[QStringLiteral("DiskCacheBehind")].value<rational>(),
|
||||
@@ -662,7 +667,7 @@ void PreviewAutoCacher::SetViewerNode(Sequence *viewer_node)
|
||||
}
|
||||
}
|
||||
|
||||
last_update_time_ = QDateTime::currentMSecsSinceEpoch();
|
||||
UpdateLastSyncedValue();
|
||||
|
||||
// Connect signals for future node additions/deletions
|
||||
connect(graph, &NodeGraph::NodeAdded, this, &PreviewAutoCacher::NodeAdded);
|
||||
|
||||
@@ -116,6 +116,8 @@ private:
|
||||
|
||||
void InsertIntoCopyMap(Node* node, Node* copy);
|
||||
|
||||
void UpdateLastSyncedValue();
|
||||
|
||||
class QueuedJob {
|
||||
public:
|
||||
enum Type {
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "rendermanager.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDateTime>
|
||||
#include <QMatrix4x4>
|
||||
#include <QThread>
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
invalidate_range = block_->range();
|
||||
}
|
||||
|
||||
track_->InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
}
|
||||
|
||||
virtual void undo() override
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
|
||||
track_->EndOperation();
|
||||
|
||||
track_->InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -884,7 +884,7 @@ public:
|
||||
|
||||
track_->EndOperation();
|
||||
|
||||
track_->InvalidateCache(TimeRange(range_.in(), RATIONAL_MAX));
|
||||
track_->Node::InvalidateCache(TimeRange(range_.in(), RATIONAL_MAX), Track::kBlockInput);
|
||||
}
|
||||
|
||||
virtual void undo() override
|
||||
@@ -916,7 +916,7 @@ public:
|
||||
// End operations and invalidate
|
||||
track_->EndOperation();
|
||||
|
||||
track_->InvalidateCache(TimeRange(range_.in(), RATIONAL_MAX));
|
||||
track_->Node::InvalidateCache(TimeRange(range_.in(), RATIONAL_MAX), Track::kBlockInput);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -1318,7 +1318,7 @@ private:
|
||||
|
||||
if (!all_tracks_unlocked_) {
|
||||
// If we're not shifting, the whole track must get invalidated
|
||||
track->InvalidateCache(TimeRange(earliest_point_of_change, RATIONAL_MAX));
|
||||
track->Node::InvalidateCache(TimeRange(earliest_point_of_change, RATIONAL_MAX), Track::kBlockInput);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1709,7 +1709,7 @@ public:
|
||||
|
||||
track_->EndOperation();
|
||||
|
||||
track_->InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
}
|
||||
|
||||
virtual void undo() override
|
||||
@@ -1766,7 +1766,7 @@ public:
|
||||
|
||||
track_->EndOperation();
|
||||
|
||||
track_->InvalidateCache(TimeRange(block_->in(), block_->out()), Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(TimeRange(block_->in(), block_->out()), Track::kBlockInput);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -2051,7 +2051,7 @@ public:
|
||||
invalidate_range.set_range(qMin(invalidate_range.in(), blocks_.first()->in()),
|
||||
qMax(invalidate_range.out(), blocks_.last()->out()));
|
||||
|
||||
track_->InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
}
|
||||
|
||||
virtual void undo() override
|
||||
@@ -2091,7 +2091,7 @@ public:
|
||||
invalidate_range.set_range(qMin(invalidate_range.in(), blocks_.first()->in()),
|
||||
qMax(invalidate_range.out(), blocks_.last()->out()));
|
||||
|
||||
track_->InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
}
|
||||
|
||||
private:
|
||||
@@ -2195,7 +2195,7 @@ public:
|
||||
|
||||
if (!all_tracks_unlocked_) {
|
||||
foreach (Track* track, working_tracks_) {
|
||||
track->InvalidateCache(TimeRange(point_, RATIONAL_MAX));
|
||||
track->Node::InvalidateCache(TimeRange(point_, RATIONAL_MAX), Track::kBlockInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2237,7 +2237,7 @@ public:
|
||||
|
||||
if (!all_tracks_unlocked_) {
|
||||
foreach (Track* track, working_tracks_) {
|
||||
track->InvalidateCache(TimeRange(point_, RATIONAL_MAX));
|
||||
track->Node::InvalidateCache(TimeRange(point_, RATIONAL_MAX), Track::kBlockInput);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2361,7 +2361,7 @@ public:
|
||||
|
||||
track_->EndOperation();
|
||||
|
||||
track_->InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(invalidate_range, Track::kBlockInput);
|
||||
}
|
||||
|
||||
virtual void undo() override
|
||||
@@ -2395,7 +2395,7 @@ public:
|
||||
|
||||
track_->EndOperation();
|
||||
|
||||
track_->InvalidateCache(TimeRange(block_->in(), block_->out()), Track::kBlockInput);
|
||||
track_->Node::InvalidateCache(TimeRange(block_->in(), block_->out()), Track::kBlockInput);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user