summaryrefslogtreecommitdiff
path: root/platform/android/src/map_renderer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src/map_renderer.hpp')
-rw-r--r--platform/android/src/map_renderer.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/android/src/map_renderer.hpp b/platform/android/src/map_renderer.hpp
index ca216fc240..2039444457 100644
--- a/platform/android/src/map_renderer.hpp
+++ b/platform/android/src/map_renderer.hpp
@@ -1,6 +1,7 @@
#pragma once
#include <mbgl/actor/scheduler.hpp>
+#include <mbgl/util/image.hpp>
#include <memory>
#include <utility>
@@ -74,6 +75,15 @@ public:
void requestRender();
+ // Snapshot - requires a RunLoop on the calling thread
+ using SnapshotCallback = std::function<void (PremultipliedImage)>;
+ void requestSnapshot(SnapshotCallback);
+
+protected:
+ // Called from the GL Thread //
+
+ void scheduleSnapshot(std::unique_ptr<SnapshotCallback>);
+
private:
// Called from the GL Thread //
@@ -105,6 +115,8 @@ private:
std::mutex updateMutex;
bool framebufferSizeChanged = false;
+
+ std::unique_ptr<SnapshotCallback> snapshotCallback;
};
} // namespace android