diff --git a/src/mbgl/geometry/buffer.hpp b/src/mbgl/geometry/buffer.hpp index 9075a26c7..df4c6a322 100644 --- a/src/mbgl/geometry/buffer.hpp +++ b/src/mbgl/geometry/buffer.hpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include diff --git a/src/mbgl/geometry/glyph_atlas.cpp b/src/mbgl/geometry/glyph_atlas.cpp index b74535ffa..c220ec53b 100644 --- a/src/mbgl/geometry/glyph_atlas.cpp +++ b/src/mbgl/geometry/glyph_atlas.cpp @@ -5,7 +5,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp index 96e238c5e..63a5a34ea 100644 --- a/src/mbgl/geometry/line_atlas.cpp +++ b/src/mbgl/geometry/line_atlas.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/mbgl/geometry/vao.cpp b/src/mbgl/geometry/vao.cpp index d711df6f9..db4d23388 100644 --- a/src/mbgl/geometry/vao.cpp +++ b/src/mbgl/geometry/vao.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/src/mbgl/util/gl_object_store.cpp b/src/mbgl/gl/gl_object_store.cpp similarity index 77% rename from src/mbgl/util/gl_object_store.cpp rename to src/mbgl/gl/gl_object_store.cpp index d6fee17a1..a830b6d73 100644 --- a/src/mbgl/util/gl_object_store.cpp +++ b/src/mbgl/gl/gl_object_store.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include @@ -7,25 +7,25 @@ #include namespace mbgl { -namespace util { +namespace gl { void GLObjectStore::abandonVAO(GLuint vao) { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); abandonedVAOs.emplace_back(vao); } void GLObjectStore::abandonBuffer(GLuint buffer) { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); abandonedBuffers.emplace_back(buffer); } void GLObjectStore::abandonTexture(GLuint texture) { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); abandonedTextures.emplace_back(texture); } void GLObjectStore::performCleanup() { - assert(ThreadContext::currentlyOn(ThreadType::Map)); + assert(util::ThreadContext::currentlyOn(util::ThreadType::Map)); if (!abandonedVAOs.empty()) { MBGL_CHECK_ERROR(VertexArrayObject::Delete(static_cast(abandonedVAOs.size()), @@ -46,5 +46,5 @@ void GLObjectStore::performCleanup() { } } -} // namespace util +} // namespace gl } // namespace mbgl diff --git a/src/mbgl/util/gl_object_store.hpp b/src/mbgl/gl/gl_object_store.hpp similarity index 93% rename from src/mbgl/util/gl_object_store.hpp rename to src/mbgl/gl/gl_object_store.hpp index e806ac158..ac8ddd274 100644 --- a/src/mbgl/util/gl_object_store.hpp +++ b/src/mbgl/gl/gl_object_store.hpp @@ -4,11 +4,10 @@ #include #include -#include #include namespace mbgl { -namespace util { +namespace gl { class GLObjectStore : private util::noncopyable { public: @@ -29,7 +28,7 @@ private: std::vector abandonedTextures; }; -} // namespace util +} // namespace gl } // namespace mbgl #endif diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index 6b4657f0a..46d979a47 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/mbgl/map/map_context.hpp b/src/mbgl/map/map_context.hpp index dd0c2de46..617e17815 100644 --- a/src/mbgl/map/map_context.hpp +++ b/src/mbgl/map/map_context.hpp @@ -8,9 +8,9 @@ #include #include #include -#include #include #include +#include #include @@ -80,7 +80,7 @@ private: std::unique_ptr dataPtr; MapData& data; - util::GLObjectStore glObjectStore; + gl::GLObjectStore glObjectStore; Update updateFlags = Update::Nothing; util::AsyncTask asyncUpdate; diff --git a/src/mbgl/sprite/sprite_atlas.cpp b/src/mbgl/sprite/sprite_atlas.cpp index b35b9e975..269ceb2c7 100644 --- a/src/mbgl/sprite/sprite_atlas.cpp +++ b/src/mbgl/sprite/sprite_atlas.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/mbgl/util/texture_pool.cpp b/src/mbgl/util/texture_pool.cpp index d4afb1f86..ec175c924 100644 --- a/src/mbgl/util/texture_pool.cpp +++ b/src/mbgl/util/texture_pool.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/src/mbgl/util/thread_context.cpp b/src/mbgl/util/thread_context.cpp index b611b3d02..485338866 100644 --- a/src/mbgl/util/thread_context.cpp +++ b/src/mbgl/util/thread_context.cpp @@ -60,7 +60,7 @@ void ThreadContext::setFileSource(FileSource* fileSource) { } } -GLObjectStore* ThreadContext::getGLObjectStore() { +gl::GLObjectStore* ThreadContext::getGLObjectStore() { if (current.get() != nullptr) { return current.get()->glObjectStore; } else { @@ -68,7 +68,7 @@ GLObjectStore* ThreadContext::getGLObjectStore() { } } -void ThreadContext::setGLObjectStore(GLObjectStore* glObjectStore) { +void ThreadContext::setGLObjectStore(gl::GLObjectStore* glObjectStore) { if (current.get() != nullptr) { current.get()->glObjectStore = glObjectStore; } else { diff --git a/src/mbgl/util/thread_context.hpp b/src/mbgl/util/thread_context.hpp index 2b22b2faf..8601cddbe 100644 --- a/src/mbgl/util/thread_context.hpp +++ b/src/mbgl/util/thread_context.hpp @@ -8,11 +8,10 @@ namespace mbgl { class FileSource; +namespace gl { class GLObjectStore; } namespace util { -class GLObjectStore; - enum class ThreadPriority : bool { Regular, Low, @@ -37,15 +36,15 @@ public: static FileSource* getFileSource(); static void setFileSource(FileSource* fileSource); - static GLObjectStore* getGLObjectStore(); - static void setGLObjectStore(GLObjectStore* glObjectStore); + static gl::GLObjectStore* getGLObjectStore(); + static void setGLObjectStore(gl::GLObjectStore* glObjectStore); std::string name; ThreadType type; ThreadPriority priority; FileSource* fileSource = nullptr; - GLObjectStore* glObjectStore = nullptr; + gl::GLObjectStore* glObjectStore = nullptr; }; } // namespace util