diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-03-12 12:55:59 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-03-12 12:55:59 +0100 |
commit | 4e8036311d434db9bb1bd41b65bd39e2891e17d0 (patch) | |
tree | 75d56f01853cb64b200d8977069dfe992266e9de /platform/default | |
parent | ba9d2420699507c6d32b12272151529663c8d2fd (diff) | |
parent | 47ede853c4c0dd8e953f3ee98b807f044d178d76 (diff) | |
download | qtlocation-mapboxgl-4e8036311d434db9bb1bd41b65bd39e2891e17d0.tar.gz |
Merge pull request #838 from mapbox/838-fix-rotate-flicker
black flicker on iOS device rotation
Diffstat (limited to 'platform/default')
-rw-r--r-- | platform/default/glfw_view.cpp | 9 | ||||
-rw-r--r-- | platform/default/headless_view.cpp | 9 |
2 files changed, 7 insertions, 11 deletions
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp index 6d23a51ffb..2d0da355b2 100644 --- a/platform/default/glfw_view.cpp +++ b/platform/default/glfw_view.cpp @@ -297,16 +297,13 @@ void GLFWView::notify() { glfwPostEmptyEvent(); } -void GLFWView::swap() { +void GLFWView::invalidate() { + assert(map); + map->render(); glfwSwapBuffers(window); - map->swapped(); fps(); } -void GLFWView::notifyMapChange(mbgl::MapChange /*change*/, std::chrono::steady_clock::duration /*delay*/) { - // no-op -} - void GLFWView::fps() { static int frames = 0; static double timeElapsed = 0; diff --git a/platform/default/headless_view.cpp b/platform/default/headless_view.cpp index 975e7f58f7..7509c48eec 100644 --- a/platform/default/headless_view.cpp +++ b/platform/default/headless_view.cpp @@ -264,10 +264,6 @@ void HeadlessView::notify() { // no-op } -void HeadlessView::notifyMapChange(mbgl::MapChange /*change*/, std::chrono::steady_clock::duration /*delay*/) { - // no-op -} - void HeadlessView::activate() { #if MBGL_USE_CGL CGLError error = CGLSetCurrentContext(glContext); @@ -298,6 +294,9 @@ void HeadlessView::deactivate() { #endif } -void HeadlessView::swap() {} +void HeadlessView::invalidate() { + assert(map); + map->render(); +} } |