blob: 151302233b01ae1f3843ce31d1ad08bf9e1d58c1 [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "flutter/flow/layer_snapshot_store.h"
#include "flutter/fml/time/time_delta.h"
#include "flutter/fml/time/time_point.h"
namespace flutter {
LayerSnapshotData::LayerSnapshotData(int64_t layer_unique_id,
fml::TimeDelta duration,
sk_sp<SkData> snapshot)
: layer_unique_id_(layer_unique_id),
duration_(duration),
snapshot_(snapshot) {}
void LayerSnapshotStore::Clear() {
layer_snapshots_.clear();
}
void LayerSnapshotStore::Add(int64_t layer_unique_id,
fml::TimeDelta duration,
sk_sp<SkData> snapshot) {
layer_snapshots_.emplace_back(layer_unique_id, duration, snapshot);
}
} // namespace flutter