core: rename mbgl namespace to mln (#4487)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Bart Louwers
2026-08-14 23:25:20 +02:00
committed by GitHub
parent 836b862984
commit 550f64be22
1970 changed files with 8931 additions and 8967 deletions

View File

@@ -578,7 +578,7 @@ void loadWGL() {
}
#endif
namespace mbgl {
namespace mln {
namespace platform {
/* OpenGL ES 2.0 */
@@ -1780,5 +1780,5 @@ const char* (*const wglGetExtensionsStringEXT)() = [](void) {
};
} // namespace platform
} // namespace mbgl
} // namespace mln
#endif

View File

@@ -55,13 +55,13 @@ extern DummyClassThread dummyClassThread;
THREAD_INFO* GetCurrentThreadInfo();
namespace mbgl {
namespace mln {
namespace platform {
std::string getCurrentThreadName();
void setCurrentThreadName(const std::string& name);
void makeThreadLowPriority();
void setCurrentThreadPriority(double priority);
} // namespace platform
} // namespace mbgl
} // namespace mln
#endif

View File

@@ -6,7 +6,7 @@
#include <GLES3/gl3.h>
namespace mbgl {
namespace mln {
namespace platform {
/* OpenGL ES 2.0 */
@@ -281,4 +281,4 @@ void (*const glTexStorage3D)(GLenum, GLsizei, GLenum, GLsizei, GLsizei, GLsizei)
void (*const glGetInternalformativ)(GLenum, GLenum, GLenum, GLsizei, GLint*) = ::glGetInternalformativ;
} // namespace platform
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <sstream>
#include <iomanip>
namespace mbgl {
namespace mln {
namespace gl {
// This class provides a singleton that contains information about the
@@ -37,7 +37,7 @@ public:
if (!eglBindAPI(EGL_OPENGL_ES_API)) {
std::ostringstream logMsg;
logMsg << "eglBindAPI(EGL_OPENGL_ES_API) returned error " << eglGetError();
mbgl::Log::Error(mbgl::Event::OpenGL, logMsg.str());
mln::Log::Error(mln::Event::OpenGL, logMsg.str());
throw std::runtime_error("eglBindAPI() failed");
}
@@ -78,7 +78,7 @@ public:
std::ostringstream logMsg;
logMsg << "eglCreateContext() returned error 0x" << std::setw(4) << std::setfill('0') << std::hex
<< eglGetError();
mbgl::Log::Error(mbgl::Event::OpenGL, logMsg.str());
mln::Log::Error(mln::Event::OpenGL, logMsg.str());
throw std::runtime_error("Error creating the EGL context object.\n");
}
@@ -132,4 +132,4 @@ void HeadlessBackend::createImpl() {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -11,7 +11,7 @@
#include "gl_functions_wgl.h"
namespace mbgl {
namespace mln {
namespace gl {
// This class provides a singleton that contains information about the
@@ -103,10 +103,10 @@ private:
bool extensionSupportedWGL(const char* extension) {
const char* extensions = NULL;
extensions = mbgl::platform::wglGetExtensionsStringARB(wglGetCurrentDC());
extensions = mln::platform::wglGetExtensionsStringARB(wglGetCurrentDC());
if (!extensions || !StringInExtensionString(extension, extensions))
extensions = mbgl::platform::wglGetExtensionsStringEXT();
extensions = mln::platform::wglGetExtensionsStringEXT();
if (!extensions || !StringInExtensionString(extension, extensions))
extensions = (const char*)wgl_glGetString(GL_EXTENSIONS);
@@ -282,29 +282,29 @@ private:
renderingWindowDeviceContext = GetDC(renderingWindowHandle);
}
if (!mbgl::platform::wglChoosePixelFormatARB(renderingWindowDeviceContext,
std::initializer_list<GLint>({WGL_SUPPORT_OPENGL_ARB,
GL_TRUE,
WGL_DOUBLE_BUFFER_ARB,
GL_TRUE,
WGL_ACCELERATION_ARB,
WGL_FULL_ACCELERATION_ARB,
WGL_PIXEL_TYPE_ARB,
WGL_TYPE_RGBA_ARB,
WGL_COLOR_BITS_ARB,
24,
WGL_ALPHA_BITS_ARB,
8,
WGL_DEPTH_BITS_ARB,
24,
WGL_STENCIL_BITS_ARB,
8,
NULL})
.begin(),
NULL,
1,
&pixelFormat,
&numFormats)) {
if (!mln::platform::wglChoosePixelFormatARB(renderingWindowDeviceContext,
std::initializer_list<GLint>({WGL_SUPPORT_OPENGL_ARB,
GL_TRUE,
WGL_DOUBLE_BUFFER_ARB,
GL_TRUE,
WGL_ACCELERATION_ARB,
WGL_FULL_ACCELERATION_ARB,
WGL_PIXEL_TYPE_ARB,
WGL_TYPE_RGBA_ARB,
WGL_COLOR_BITS_ARB,
24,
WGL_ALPHA_BITS_ARB,
8,
WGL_DEPTH_BITS_ARB,
24,
WGL_STENCIL_BITS_ARB,
8,
NULL})
.begin(),
NULL,
1,
&pixelFormat,
&numFormats)) {
Log::Error(Event::OpenGL, "Failed to choose pixel format for context");
throw std::runtime_error("Failed to choose pixel format for context");
}
@@ -324,7 +324,7 @@ private:
}
if (wglDisplayConfig.ARB_create_context) {
renderingWindowRenderingContext = mbgl::platform::wglCreateContextAttribsARB(
renderingWindowRenderingContext = mln::platform::wglCreateContextAttribsARB(
renderingWindowDeviceContext,
NULL,
std::initializer_list<int>({WGL_CONTEXT_MAJOR_VERSION_ARB,
@@ -433,4 +433,4 @@ void HeadlessBackend::createImpl() {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -43,7 +43,7 @@ THREAD_INFO* GetCurrentThreadInfo() {
return info;
}
namespace mbgl {
namespace mln {
namespace platform {
std::string getCurrentThreadName() {
@@ -87,4 +87,4 @@ void attachThread() {}
void detachThread() {}
} // namespace platform
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#define StorageToThreadInfo reinterpret_cast<THREAD_INFO*&>(storage)
#define StorageToConstThreadInfo reinterpret_cast<THREAD_INFO* const&>(storage)
namespace mbgl {
namespace mln {
namespace util {
namespace impl {
@@ -59,4 +59,4 @@ void ThreadLocalBase::set(void* ptr) {
} // namespace impl
} // namespace util
} // namespace mbgl
} // namespace mln