From 6532438fe47bca1af690779ffa7292d6f1080d0c Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 26 Jun 2015 15:10:15 -0700 Subject: Rationalize *RenderingMap notifications --- include/mbgl/ios/MGLMapView.h | 6 ++++++ include/mbgl/map/map.hpp | 9 +++++++++ include/mbgl/map/view.hpp | 9 ++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 346bb62257..918f521a83 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -418,6 +418,12 @@ IB_DESIGNABLE // TODO - (void)mapViewDidFinishRenderingMap:(MGLMapView *)mapView fullyRendered:(BOOL)fullyRendered; +// TODO +- (void)mapViewWillStartRenderingFrame:(MGLMapView *)mapView; + +// TODO +- (void)mapViewDidFinishRenderingFrame:(MGLMapView *)mapView fullyRendered:(BOOL)fullyRendered; + #pragma mark - Tracking the User Location /** @name Tracking the User Location */ diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 59f23fe2b2..e1dd4671b2 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -156,9 +156,18 @@ public: bool isFullyLoaded() const; private: + View& view; const std::unique_ptr transform; const std::unique_ptr data; const std::unique_ptr> context; + + enum class RenderState { + never, + partial, + fully + }; + + RenderState renderState = RenderState::never; bool paused = false; }; diff --git a/include/mbgl/map/view.hpp b/include/mbgl/map/view.hpp index e3b0810c45..575d0df015 100644 --- a/include/mbgl/map/view.hpp +++ b/include/mbgl/map/view.hpp @@ -20,9 +20,12 @@ enum MapChange : uint8_t { MapChangeWillStartLoadingMap = 5, MapChangeDidFinishLoadingMap = 6, MapChangeDidFailLoadingMap = 7, - MapChangeWillStartRenderingMap = 8, - MapChangeDidFinishRenderingMap = 9, - MapChangeDidFinishRenderingMapFullyRendered = 10 + MapChangeWillStartRenderingFrame = 8, + MapChangeDidFinishRenderingFrame = 9, + MapChangeDidFinishRenderingFrameFullyRendered = 10, + MapChangeWillStartRenderingMap = 11, + MapChangeDidFinishRenderingMap = 12, + MapChangeDidFinishRenderingMapFullyRendered = 13, }; class View { -- cgit v1.2.1