aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYahan Zhou <yahan@google.com>2024-01-29 18:46:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-01-29 18:46:14 +0000
commit26b027d4bc5a5489c1144b3c921af3fd62d8f7b1 (patch)
tree99d220991150ed175717cb8805e08e2e729066cf
parent2a5ed0c0c3191176558f5b30b537708704f198ae (diff)
parent4078f31b05d8f2efc0724779fee038af12b067fa (diff)
downloadaemu-26b027d4bc5a5489c1144b3c921af3fd62d8f7b1.tar.gz
Merge "Add an opaque struct to contain snapshot save/load streams" into main
-rw-r--r--snapshot/include/snapshot/common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/snapshot/include/snapshot/common.h b/snapshot/include/snapshot/common.h
index bc4d3cf..c62ffc0 100644
--- a/snapshot/include/snapshot/common.h
+++ b/snapshot/include/snapshot/common.h
@@ -18,6 +18,8 @@
#include "interface.h"
+#include "aemu/base/files/Stream.h"
+
#include <memory>
#include <string>
#include <stdint.h>
@@ -45,6 +47,16 @@ using ITextureSaverPtr = std::shared_ptr<ITextureSaver>;
using ITextureLoaderPtr = std::shared_ptr<ITextureLoader>;
using ITextureLoaderWPtr = std::weak_ptr<ITextureLoader>;
+struct SnapshotSaveStream {
+ android::base::Stream* stream = nullptr;
+ ITextureSaverPtr textureSaver;
+};
+
+struct SnapshotLoadStream {
+ android::base::Stream* stream = nullptr;
+ ITextureLoaderPtr textureLoader;
+};
+
// Taken from exec.c, these #defines
// are for the |flags| field in SnapshotRamBlock.
#define SNAPSHOT_RAM_MAPPED_SHARED (1 << 1)