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
This commit is contained in:
@@ -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;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user