[core, darwin, android] Add onDidEnterIdle to MapObserver.

didEnterIdle fires whenever render completes and no repaint is scheduled.
This commit is contained in:
Chris Loer
2018-12-06 13:31:42 +02:00
committed by Chris Loer
parent 13e117b501
commit 70c2d5a4ca
14 changed files with 161 additions and 1 deletions

View File

@@ -186,6 +186,15 @@ void NativeMapView::onDidFinishRenderingMap(MapObserver::RenderMode mode) {
javaPeer.get(*_env).Call(*_env, onDidFinishRenderingMap, (jboolean) (mode != MapObserver::RenderMode::Partial));
}
void NativeMapView::onDidEnterIdle() {
assert(vm != nullptr);
android::UniqueEnv _env = android::AttachEnv();
static auto& javaClass = jni::Class<NativeMapView>::Singleton(*_env);
static auto onDidEnterIdle = javaClass.GetMethod<void ()>(*_env, "onDidEnterIdle");
javaPeer.get(*_env).Call(*_env, onDidEnterIdle);
}
void NativeMapView::onDidFinishLoadingStyle() {
assert(vm != nullptr);