summaryrefslogtreecommitdiff
path: root/include/mbgl/platform
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-03-11 19:43:13 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-03-12 12:16:38 +0100
commit47ede853c4c0dd8e953f3ee98b807f044d178d76 (patch)
tree75d56f01853cb64b200d8977069dfe992266e9de /include/mbgl/platform
parentba9d2420699507c6d32b12272151529663c8d2fd (diff)
downloadqtlocation-mapboxgl-47ede853c4c0dd8e953f3ee98b807f044d178d76.tar.gz
fixes black flicker on rotating the device
fixes #838 instead of rendering ad libitum on the map thread, we are now driving rendering from the UI thread on iOS via the map.renderSync() function. There are still white bars during the rotation, but the general content of the view is kept visible. - upgrades GLFW to 3.1 - removes swapped/needsSwap in favor of a more explicit scheme - View#invalidate() now replaces View#swap() and is called whenever the View needs to trigger a rerender. GLFW and Android to this right away, while iOS goes back to the main thread and does the Map redrawing as part of the GLKView update - sets all iOS deployment targets to 7.0 - disables SQLite3 version check, since the library version changed on iOS 8.2
Diffstat (limited to 'include/mbgl/platform')
-rw-r--r--include/mbgl/platform/default/glfw_view.hpp13
-rw-r--r--include/mbgl/platform/default/headless_view.hpp11
2 files changed, 10 insertions, 14 deletions
diff --git a/include/mbgl/platform/default/glfw_view.hpp b/include/mbgl/platform/default/glfw_view.hpp
index 8f5cfb7281..234568e4b7 100644
--- a/include/mbgl/platform/default/glfw_view.hpp
+++ b/include/mbgl/platform/default/glfw_view.hpp
@@ -13,12 +13,11 @@ public:
GLFWView(bool fullscreen = false);
~GLFWView();
- void initialize(mbgl::Map *map);
- void swap();
- void activate();
- void deactivate();
- void notify();
- void notifyMapChange(mbgl::MapChange change, std::chrono::steady_clock::duration delay = std::chrono::steady_clock::duration::zero());
+ void initialize(mbgl::Map *map) override;
+ void activate() override;
+ void deactivate() override;
+ void notify() override;
+ void invalidate() override;
static void onKey(GLFWwindow *window, int key, int scancode, int action, int mods);
static void onScroll(GLFWwindow *window, double xoffset, double yoffset);
@@ -26,8 +25,6 @@ public:
static void onMouseClick(GLFWwindow *window, int button, int action, int modifiers);
static void onMouseMove(GLFWwindow *window, double x, double y);
- static void eventloop(void *arg);
-
int run();
void fps();
diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp
index 5d0e55d69a..5ba6709a4f 100644
--- a/include/mbgl/platform/default/headless_view.hpp
+++ b/include/mbgl/platform/default/headless_view.hpp
@@ -13,7 +13,7 @@ typedef long unsigned int XID;
typedef XID GLXPbuffer;
#endif
-#include <mbgl/map/view.hpp>
+#include <mbgl/mbgl.hpp>
#include <mbgl/platform/gl.hpp>
#include <memory>
@@ -34,11 +34,10 @@ public:
void resize(uint16_t width, uint16_t height, float pixelRatio);
std::unique_ptr<uint32_t[]> readPixels();
- void notify();
- void notifyMapChange(MapChange change, std::chrono::steady_clock::duration delay = std::chrono::steady_clock::duration::zero());
- void activate();
- void deactivate();
- void swap();
+ void activate() override;
+ void deactivate() override;
+ void notify() override;
+ void invalidate() override;
private:
void clearBuffers();