summaryrefslogtreecommitdiff
path: root/include/mbgl/map/view.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/map/view.hpp')
-rw-r--r--include/mbgl/map/view.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/mbgl/map/view.hpp b/include/mbgl/map/view.hpp
index 9b29227d8b..8e21233b72 100644
--- a/include/mbgl/map/view.hpp
+++ b/include/mbgl/map/view.hpp
@@ -3,9 +3,12 @@
#include <mbgl/util/chrono.hpp>
+#include <memory>
+
namespace mbgl {
class Map;
+class StillImage;
enum MapChange : uint8_t {
MapChangeRegionWillChange = 0,
@@ -40,6 +43,14 @@ public:
// (i.e. map->renderSync() or map->renderAsync() must be called as a result of this)
virtual void invalidate() = 0;
+ // Called from the render (=GL) thread. Signals that the contents of the contents
+ // may be discarded. The default is a no-op.
+ virtual void discard();
+
+ // Reads the pixel data from the current framebuffer. If your View implementation
+ // doesn't support reading from the framebuffer, return a null pointer.
+ virtual std::unique_ptr<StillImage> readStillImage();
+
// Notifies a watcher of map x/y/scale/rotation changes.
// Must only be called from the same thread that caused the change.
// Must not be called from the render thread.