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.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/android/src/map_renderer.hpp b/platform/android/src/map_renderer.hpp
index 5a8ddeeb91..047f1870c7 100644
--- a/platform/android/src/map_renderer.hpp
+++ b/platform/android/src/map_renderer.hpp
@@ -67,7 +67,8 @@ public:
// From Scheduler. Schedules by using callbacks to the
// JVM to process the mailbox on the right thread.
- void schedule(std::weak_ptr<Mailbox> scheduled) override;
+ void schedule(std::function<void()> scheduled) override;
+ mapbox::base::WeakPtr<Scheduler> makeWeakPtr() override { return weakFactory.makeWeakPtr(); }
void requestRender();
@@ -122,6 +123,7 @@ private:
std::atomic<bool> destroyed {false};
std::unique_ptr<SnapshotCallback> snapshotCallback;
+ mapbox::base::WeakPtrFactory<Scheduler> weakFactory{this};
};
} // namespace android