summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorLeith Bade <leith@mapbox.com>2014-11-26 23:47:37 +1100
committerLeith Bade <leith@mapbox.com>2014-11-28 00:19:11 +1100
commitb1c793d1e00c470b86c8750b51c1b15beaeaecd7 (patch)
tree343133fca3af457676975eb439691912b4f79863 /include/mbgl
parentb07a6ba9ee71255e3d1c87f92ccdc5a0c0d6589c (diff)
downloadqtlocation-mapboxgl-b1c793d1e00c470b86c8750b51c1b15beaeaecd7.tar.gz
Add fps mode for #646
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/android/jni.hpp1
-rw-r--r--include/mbgl/android/native_map_view.hpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/mbgl/android/jni.hpp b/include/mbgl/android/jni.hpp
index 2dbdf2ebe7..da3f59dae5 100644
--- a/include/mbgl/android/jni.hpp
+++ b/include/mbgl/android/jni.hpp
@@ -12,6 +12,7 @@ extern std::string data_path;
extern std::string apk_path;
extern jmethodID on_map_changed_id;
+extern jmethodID on_fps_changed_id;
extern jclass lon_lat_class;
extern jmethodID lon_lat_constructor_id;
diff --git a/include/mbgl/android/native_map_view.hpp b/include/mbgl/android/native_map_view.hpp
index 8f37fe947e..4752d18625 100644
--- a/include/mbgl/android/native_map_view.hpp
+++ b/include/mbgl/android/native_map_view.hpp
@@ -59,6 +59,9 @@ public:
void notifyMapChange();
+ void enableFps(bool enable);
+ void updateFps();
+
private:
EGLConfig chooseConfig(const EGLConfig configs[], EGLint num_configs);
@@ -86,6 +89,9 @@ private:
bool first_time = false;
bool using_depth24 = false;
+
+ bool fps_enabled = false;
+ double fps = 0.0;
};
}