summaryrefslogtreecommitdiff
path: root/src/mbgl/geometry
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-06-03 16:40:15 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-06-06 22:19:25 +0300
commit7b8698b47a0ff5c4adaf474e47f89434f287f183 (patch)
tree410f69ee4d1161157b788409744d6391da54492e /src/mbgl/geometry
parent874fa41c128c2c3c7e075b0dcde727d6cf678866 (diff)
downloadqtlocation-mapboxgl-7b8698b47a0ff5c4adaf474e47f89434f287f183.tar.gz
[core] Naive atomic type for ARMv5
std::atomic<bool> is implemented lock free which doesn't work on ARMv5 and seems like the compiler is generating bogus code. This workaround is a naive implementation using regular mutexes.
Diffstat (limited to 'src/mbgl/geometry')
-rw-r--r--src/mbgl/geometry/glyph_atlas.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/geometry/glyph_atlas.hpp b/src/mbgl/geometry/glyph_atlas.hpp
index d4a51761a1..d3e2a62199 100644
--- a/src/mbgl/geometry/glyph_atlas.hpp
+++ b/src/mbgl/geometry/glyph_atlas.hpp
@@ -2,6 +2,7 @@
#include <mbgl/geometry/binpack.hpp>
#include <mbgl/text/glyph_store.hpp>
+#include <mbgl/util/atomic.hpp>
#include <mbgl/util/noncopyable.hpp>
#include <mbgl/util/optional.hpp>
#include <mbgl/gl/gl.hpp>
@@ -11,7 +12,6 @@
#include <set>
#include <unordered_map>
#include <mutex>
-#include <atomic>
namespace mbgl {
@@ -53,7 +53,7 @@ private:
BinPack<uint16_t> bin;
std::unordered_map<FontStack, std::map<uint32_t, GlyphValue>, FontStackHash> index;
const std::unique_ptr<uint8_t[]> data;
- std::atomic<bool> dirty;
+ util::Atomic<bool> dirty;
mbgl::optional<gl::UniqueTexture> texture;
};