1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/flow/layer_snapshot_store.h"
6
7#include "flutter/fml/time/time_delta.h"
8#include "flutter/fml/time/time_point.h"
9
10namespace flutter {
11
12LayerSnapshotData::LayerSnapshotData(int64_t layer_unique_id,
13 const fml::TimeDelta& duration,
14 const sk_sp<SkData>& snapshot,
15 const SkRect& bounds)
16 : layer_unique_id_(layer_unique_id),
17 duration_(duration),
18 snapshot_(snapshot),
19 bounds_(bounds) {}
20
21void LayerSnapshotStore::Clear() {
22 layer_snapshots_.clear();
23}
24
25void LayerSnapshotStore::Add(const LayerSnapshotData& data) {
26 layer_snapshots_.push_back(x: data);
27}
28
29} // namespace flutter
30

source code of flutter_engine/flutter/flow/layer_snapshot_store.cc