summaryrefslogtreecommitdiff
path: root/platform/default
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-04-28 16:03:45 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-04-28 16:15:07 +0300
commit94093493d5b8ef688847fca71db98edac65534b6 (patch)
treeaa1af16fa087a6635e31cfdfe4f22c511cec97f9 /platform/default
parent72f351c153391cc655cefcbab234183d5d1fef10 (diff)
downloadqtlocation-mapboxgl-94093493d5b8ef688847fca71db98edac65534b6.tar.gz
[glfw] Atomic is no longer needed
All View events come from the same thread.
Diffstat (limited to 'platform/default')
-rw-r--r--platform/default/glfw_view.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp
index bdadaa6f36..7fb47ff7c9 100644
--- a/platform/default/glfw_view.cpp
+++ b/platform/default/glfw_view.cpp
@@ -417,15 +417,12 @@ void GLFWView::onMouseMove(GLFWwindow *window, double x, double y) {
void GLFWView::run() {
auto callback = [&] {
if (glfwWindowShouldClose(window)) {
- frameTick.stop();
runLoop.stop();
-
return;
}
glfwPollEvents();
- const bool dirty = !clean.test_and_set();
if (dirty) {
const double started = glfwGetTime();
@@ -444,6 +441,8 @@ void GLFWView::run() {
if (benchmark) {
map->update(mbgl::Update::Repaint);
}
+
+ dirty = false;
}
};
@@ -476,7 +475,7 @@ void GLFWView::deactivate() {
}
void GLFWView::invalidate() {
- clean.clear();
+ dirty = true;
glfwPostEmptyEvent();
}