summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/map.hpp1
-rw-r--r--include/mbgl/platform/default/glfw_view.hpp10
2 files changed, 9 insertions, 2 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index ae43dc8a8f..ebd79620d6 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -164,6 +164,7 @@ public:
void setDebug(bool value);
void toggleDebug();
bool getDebug() const;
+ void setNeedsRepaint();
void setCollisionDebug(bool value);
void toggleCollisionDebug();
bool getCollisionDebug() const;
diff --git a/include/mbgl/platform/default/glfw_view.hpp b/include/mbgl/platform/default/glfw_view.hpp
index 1bc210b29e..ec99080732 100644
--- a/include/mbgl/platform/default/glfw_view.hpp
+++ b/include/mbgl/platform/default/glfw_view.hpp
@@ -12,7 +12,7 @@
class GLFWView : public mbgl::View {
public:
- GLFWView(bool fullscreen = false);
+ GLFWView(bool fullscreen = false, bool benchmark = false);
~GLFWView();
float getPixelRatio() const override;
@@ -42,7 +42,7 @@ public:
void setWindowTitle(const std::string&);
void run();
- void fps();
+ void report(float duration);
private:
mbgl::LatLng makeRandomPoint() const;
@@ -61,9 +61,15 @@ private:
private:
bool fullscreen = false;
+ const bool benchmark = false;
bool tracking = false;
bool rotating = false;
+ // Frame timer
+ int frames = 0;
+ float frameTime = 0;
+ double lastReported = 0;
+
int width = 1024;
int height = 768;
int fbWidth;