diff options
author | Leith Bade <leith@mapbox.com> | 2015-05-06 12:47:15 +1000 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2015-05-09 12:02:39 +1000 |
commit | 703e0bc2ee609a59e90b7ba3ddefffaf17291bf4 (patch) | |
tree | 4582e6a53eacf62bb59b76fe8d195e7fe99cd245 /include | |
parent | fd099593dc0a8fe8cb156fa22bf3739a7c325036 (diff) | |
download | qtlocation-mapboxgl-703e0bc2ee609a59e90b7ba3ddefffaf17291bf4.tar.gz |
Ignore deactivate when no valid EGL display. Fixes #1435
Initialise NativeMapView's EGL variables before Map
Fix hang
Add check for double pause
Add test for double pause
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/android/native_map_view.hpp | 11 | ||||
-rw-r--r-- | include/mbgl/map/map.hpp | 4 | ||||
-rw-r--r-- | include/mbgl/map/update.hpp | 1 |
3 files changed, 8 insertions, 8 deletions
diff --git a/include/mbgl/android/native_map_view.hpp b/include/mbgl/android/native_map_view.hpp index c6f0c7b351..fae239e070 100644 --- a/include/mbgl/android/native_map_view.hpp +++ b/include/mbgl/android/native_map_view.hpp @@ -55,11 +55,6 @@ private: jobject obj = nullptr; ANativeWindow *window = nullptr; - - mbgl::SQLiteCache fileCache; - mbgl::DefaultFileSource fileSource; - mbgl::Map map; - EGLDisplay display = EGL_NO_DISPLAY; EGLSurface surface = EGL_NO_SURFACE; EGLContext context = EGL_NO_CONTEXT; @@ -74,6 +69,12 @@ private: bool fpsEnabled = false; double fps = 0.0; + + // Ensure these are initialised last + mbgl::SQLiteCache fileCache; + mbgl::DefaultFileSource fileSource; + mbgl::Map map; + }; } } diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index bdb384b24e..e71c5f5b4d 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -31,8 +31,7 @@ class Map : private util::noncopyable { public: explicit Map(View&, FileSource&, - MapMode mode = MapMode::Continuous, - bool startPaused = false); + MapMode mode = MapMode::Continuous); ~Map(); // Pauses the render thread. The render thread will stop running but will not be terminated and will not lose state until resumed. @@ -137,6 +136,7 @@ public: private: const std::unique_ptr<MapData> data; const std::unique_ptr<util::Thread<MapContext>> context; + bool paused = false; }; } diff --git a/include/mbgl/map/update.hpp b/include/mbgl/map/update.hpp index 49da65d547..b4c6b5f13c 100644 --- a/include/mbgl/map/update.hpp +++ b/include/mbgl/map/update.hpp @@ -9,7 +9,6 @@ using UpdateType = uint32_t; enum class Update : UpdateType { Nothing = 0, - Debug = 1 << 1, DefaultTransitionDuration = 1 << 2, Classes = 1 << 3, Zoom = 1 << 4, |