summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-06-26 15:10:15 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-06-30 10:13:24 -0700
commit6532438fe47bca1af690779ffa7292d6f1080d0c (patch)
treeb62816c6541f1c1e42c85901c2600080b64f98a5 /include
parent8c4a03acb4298bd0f3344c6e9667ef1ee2726b6d (diff)
downloadqtlocation-mapboxgl-6532438fe47bca1af690779ffa7292d6f1080d0c.tar.gz
Rationalize *RenderingMap notifications
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/ios/MGLMapView.h6
-rw-r--r--include/mbgl/map/map.hpp9
-rw-r--r--include/mbgl/map/view.hpp9
3 files changed, 21 insertions, 3 deletions
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> transform;
const std::unique_ptr<MapData> data;
const std::unique_ptr<util::Thread<MapContext>> 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 {