diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-09-11 19:01:37 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-09-12 00:40:08 +0300 |
commit | 8af78ddbb9744f61d14f9e611aeffc08edd9ac0c (patch) | |
tree | a1829f17b377f8a1bf0a622b1ff83a81df15f851 /platform | |
parent | 03dadb1cea7abd95c178a5eb3603b54b5cb1dcdb (diff) | |
download | qtlocation-mapboxgl-8af78ddbb9744f61d14f9e611aeffc08edd9ac0c.tar.gz |
[core] Update MapObserver::onDidFinishRenderingFrame() API
Diffstat (limited to 'platform')
-rwxr-xr-x | platform/android/src/native_map_view.cpp | 4 | ||||
-rwxr-xr-x | platform/android/src/native_map_view.hpp | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView+Impl.h | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView+Impl.mm | 4 | ||||
-rw-r--r-- | platform/macos/src/MGLMapView+Impl.h | 2 | ||||
-rw-r--r-- | platform/macos/src/MGLMapView+Impl.mm | 4 | ||||
-rw-r--r-- | platform/qt/src/qmapboxgl_map_observer.cpp | 4 | ||||
-rw-r--r-- | platform/qt/src/qmapboxgl_map_observer.hpp | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp index 8ef757de15..7b87693cf5 100755 --- a/platform/android/src/native_map_view.cpp +++ b/platform/android/src/native_map_view.cpp @@ -185,7 +185,7 @@ void NativeMapView::onWillStartRenderingFrame() { } } -void NativeMapView::onDidFinishRenderingFrame(MapObserver::RenderMode mode, bool) { +void NativeMapView::onDidFinishRenderingFrame(MapObserver::RenderFrameStatus status) { assert(vm != nullptr); android::UniqueEnv _env = android::AttachEnv(); @@ -193,7 +193,7 @@ void NativeMapView::onDidFinishRenderingFrame(MapObserver::RenderMode mode, bool static auto onDidFinishRenderingFrame = javaClass.GetMethod<void (jboolean)>(*_env, "onDidFinishRenderingFrame"); auto weakReference = javaPeer.get(*_env); if (weakReference) { - weakReference.Call(*_env, onDidFinishRenderingFrame, (jboolean) (mode != MapObserver::RenderMode::Partial)); + weakReference.Call(*_env, onDidFinishRenderingFrame, (jboolean) (status.mode != MapObserver::RenderMode::Partial)); } } diff --git a/platform/android/src/native_map_view.hpp b/platform/android/src/native_map_view.hpp index 26567a003c..ba2178022e 100755 --- a/platform/android/src/native_map_view.hpp +++ b/platform/android/src/native_map_view.hpp @@ -62,7 +62,7 @@ public: void onDidFinishLoadingMap() override; void onDidFailLoadingMap(MapLoadError, const std::string&) override; void onWillStartRenderingFrame() override; - void onDidFinishRenderingFrame(MapObserver::RenderMode, bool) override; + void onDidFinishRenderingFrame(MapObserver::RenderFrameStatus) override; void onWillStartRenderingMap() override; void onDidFinishRenderingMap(MapObserver::RenderMode) override; void onDidBecomeIdle() override; diff --git a/platform/ios/src/MGLMapView+Impl.h b/platform/ios/src/MGLMapView+Impl.h index 66dc408274..232215bd1b 100644 --- a/platform/ios/src/MGLMapView+Impl.h +++ b/platform/ios/src/MGLMapView+Impl.h @@ -62,7 +62,7 @@ public: void onDidFinishLoadingMap() override; void onDidFailLoadingMap(mbgl::MapLoadError mapError, const std::string& what) override; void onWillStartRenderingFrame() override; - void onDidFinishRenderingFrame(mbgl::MapObserver::RenderMode, bool) override; + void onDidFinishRenderingFrame(mbgl::MapObserver::RenderFrameStatus) override; void onWillStartRenderingMap() override; void onDidFinishRenderingMap(mbgl::MapObserver::RenderMode) override; void onDidFinishLoadingStyle() override; diff --git a/platform/ios/src/MGLMapView+Impl.mm b/platform/ios/src/MGLMapView+Impl.mm index 76c9c0f9ba..9cdab4dc63 100644 --- a/platform/ios/src/MGLMapView+Impl.mm +++ b/platform/ios/src/MGLMapView+Impl.mm @@ -68,8 +68,8 @@ void MGLMapViewImpl::onWillStartRenderingFrame() { [mapView mapViewWillStartRenderingFrame]; } -void MGLMapViewImpl::onDidFinishRenderingFrame(mbgl::MapObserver::RenderMode mode, bool) { - bool fullyRendered = mode == mbgl::MapObserver::RenderMode::Full; +void MGLMapViewImpl::onDidFinishRenderingFrame(mbgl::MapObserver::RenderFrameStatus status) { + bool fullyRendered = status.mode == mbgl::MapObserver::RenderMode::Full; [mapView mapViewDidFinishRenderingFrameFullyRendered:fullyRendered]; } diff --git a/platform/macos/src/MGLMapView+Impl.h b/platform/macos/src/MGLMapView+Impl.h index de235fa147..d33a19dbab 100644 --- a/platform/macos/src/MGLMapView+Impl.h +++ b/platform/macos/src/MGLMapView+Impl.h @@ -30,7 +30,7 @@ public: void onDidFinishLoadingMap() override; void onDidFailLoadingMap(mbgl::MapLoadError mapError, const std::string& what) override; void onWillStartRenderingFrame() override; - void onDidFinishRenderingFrame(mbgl::MapObserver::RenderMode, bool /*placementChanged*/) override; + void onDidFinishRenderingFrame(mbgl::MapObserver::RenderFrameStatus) override; void onWillStartRenderingMap() override; void onDidFinishRenderingMap(mbgl::MapObserver::RenderMode) override; void onDidFinishLoadingStyle() override; diff --git a/platform/macos/src/MGLMapView+Impl.mm b/platform/macos/src/MGLMapView+Impl.mm index 1ed5e2ceef..c00f858153 100644 --- a/platform/macos/src/MGLMapView+Impl.mm +++ b/platform/macos/src/MGLMapView+Impl.mm @@ -67,8 +67,8 @@ void MGLMapViewImpl::onWillStartRenderingFrame() { [mapView mapViewWillStartRenderingFrame]; } -void MGLMapViewImpl::onDidFinishRenderingFrame(mbgl::MapObserver::RenderMode mode, bool) { - bool fullyRendered = mode == mbgl::MapObserver::RenderMode::Full; +void MGLMapViewImpl::onDidFinishRenderingFrame(mbgl::MapObserver::RenderFrameStatus status) { + bool fullyRendered = status.mode == mbgl::MapObserver::RenderMode::Full; [mapView mapViewDidFinishRenderingFrameFullyRendered:fullyRendered]; } diff --git a/platform/qt/src/qmapboxgl_map_observer.cpp b/platform/qt/src/qmapboxgl_map_observer.cpp index 7d2af08cc4..00af666b0f 100644 --- a/platform/qt/src/qmapboxgl_map_observer.cpp +++ b/platform/qt/src/qmapboxgl_map_observer.cpp @@ -77,9 +77,9 @@ void QMapboxGLMapObserver::onWillStartRenderingFrame() emit mapChanged(QMapboxGL::MapChangeWillStartRenderingFrame); } -void QMapboxGLMapObserver::onDidFinishRenderingFrame(mbgl::MapObserver::RenderMode mode, bool) +void QMapboxGLMapObserver::onDidFinishRenderingFrame(mbgl::MapObserver::RenderFrameStatus status) { - if (mode == mbgl::MapObserver::RenderMode::Partial) { + if (status.mode == mbgl::MapObserver::RenderMode::Partial) { emit mapChanged(QMapboxGL::MapChangeDidFinishRenderingFrame); } else { emit mapChanged(QMapboxGL::MapChangeDidFinishRenderingFrameFullyRendered); diff --git a/platform/qt/src/qmapboxgl_map_observer.hpp b/platform/qt/src/qmapboxgl_map_observer.hpp index 1620c1ef87..d9e51db28f 100644 --- a/platform/qt/src/qmapboxgl_map_observer.hpp +++ b/platform/qt/src/qmapboxgl_map_observer.hpp @@ -28,7 +28,7 @@ public: void onDidFinishLoadingMap() final; void onDidFailLoadingMap(mbgl::MapLoadError, const std::string&) final; void onWillStartRenderingFrame() final; - void onDidFinishRenderingFrame(mbgl::MapObserver::RenderMode, bool /*placementChanged*/) final; + void onDidFinishRenderingFrame(mbgl::MapObserver::RenderFrameStatus) final; void onWillStartRenderingMap() final; void onDidFinishRenderingMap(mbgl::MapObserver::RenderMode) final; void onDidFinishLoadingStyle() final; |