diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-06-25 14:39:42 +0200 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-06-26 10:32:06 -0700 |
commit | dca42018d26aaab2148db0b8f2971821ebc3a4cf (patch) | |
tree | 376402b108bc895ea4e5c45cdcda14af959abb61 /include/mbgl/android | |
parent | 84e2ea886dc55917a1d6b665337fff6d3862984a (diff) | |
download | qtlocation-mapboxgl-dca42018d26aaab2148db0b8f2971821ebc3a4cf.tar.gz |
drive Android rendering from the main thread via invalidate() calls
Diffstat (limited to 'include/mbgl/android')
-rw-r--r-- | include/mbgl/android/jni.hpp | 1 | ||||
-rw-r--r-- | include/mbgl/android/native_map_view.hpp | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/android/jni.hpp b/include/mbgl/android/jni.hpp index 721104897d..48e2740b09 100644 --- a/include/mbgl/android/jni.hpp +++ b/include/mbgl/android/jni.hpp @@ -16,6 +16,7 @@ extern std::string dataPath; extern std::string apkPath; extern std::string androidRelease; +extern jmethodID onInvalidateId; extern jmethodID onMapChangedId; extern jmethodID onFpsChangedId; diff --git a/include/mbgl/android/native_map_view.hpp b/include/mbgl/android/native_map_view.hpp index 8c632fb1fe..9b89e7305c 100644 --- a/include/mbgl/android/native_map_view.hpp +++ b/include/mbgl/android/native_map_view.hpp @@ -46,6 +46,8 @@ public: void enableFps(bool enable); void updateFps(); + void onInvalidate(); + private: EGLConfig chooseConfig(const EGLConfig configs[], EGLint numConfigs); @@ -76,6 +78,7 @@ private: mbgl::DefaultFileSource fileSource; mbgl::Map map; + std::atomic_flag clean = ATOMIC_FLAG_INIT; }; } } |