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

@@ -12,7 +12,7 @@
#include <type_traits>
#include <cassert>
namespace mbgl {
namespace mln {
class TaggedScheduler;
@@ -83,4 +83,4 @@ private:
EstablishedActor<Object> target;
};
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
namespace mbgl {
namespace mln {
/**
An `ActorRef<O>` is a *non*-owning, weak reference to an actor of type `O`.
@@ -57,4 +57,4 @@ private:
std::weak_ptr<Mailbox> weakMailbox;
};
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <type_traits>
#include <cassert>
namespace mbgl {
namespace mln {
template <class Object>
class EstablishedActor;
@@ -56,4 +56,4 @@ private:
friend class Actor<Object>;
};
} // namespace mbgl
} // namespace mln

View File

@@ -11,7 +11,7 @@
#include <type_traits>
#include <cassert>
namespace mbgl {
namespace mln {
/**
An `EstablishedActor<O>` is one half of the pair of types that comprise an
@@ -107,4 +107,4 @@ private:
AspiringActor<Object>& parent;
};
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <mapbox/std/weak.hpp>
#include <mbgl/actor/scheduler.hpp>
namespace mbgl {
namespace mln {
class Scheduler;
class Message;
@@ -61,4 +61,4 @@ private:
std::queue<std::unique_ptr<Message>> queue;
};
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <future>
#include <utility>
namespace mbgl {
namespace mln {
// A movable type-erasing function wrapper. This allows to store arbitrary
// invocable things (like std::function<>, or the result of a movable-only
@@ -100,4 +100,4 @@ std::unique_ptr<Message> makeMessage(std::promise<ResultType>&& promise,
}
} // namespace actor
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/actor/actor.hpp>
#include <mbgl/actor/optional_actor_ref.hpp>
namespace mbgl {
namespace mln {
class TaggedScheduler;
@@ -79,4 +79,4 @@ private:
OptionalActorRef<Object> selfRef;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/actor/actor_ref.hpp>
namespace mbgl {
namespace mln {
class TaggedScheduler;
@@ -37,4 +37,4 @@ private:
std::optional<ActorRef<Object>> actorRef;
};
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <memory>
#include <type_traits>
namespace mbgl {
namespace mln {
class Mailbox;
@@ -147,10 +147,10 @@ public:
scheduler->scheduleAndReplyValue(tag, task, reply);
}
const mbgl::util::SimpleIdentity tag;
const mln::util::SimpleIdentity tag;
private:
std::shared_ptr<Scheduler> scheduler;
};
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <vector>
#include <string>
namespace mbgl {
namespace mln {
using AnnotationID = uint64_t;
using AnnotationIDs = std::vector<AnnotationID>;
@@ -63,4 +63,4 @@ public:
using Annotation = variant<SymbolAnnotation, LineAnnotation, FillAnnotation>;
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <cstdlib>
#include <memory>
namespace mbgl {
namespace mln {
namespace gfx {
class Backend {
@@ -66,4 +66,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -1,6 +1,6 @@
#pragma once
namespace mbgl {
namespace mln {
namespace gfx {
class RendererBackend;
@@ -35,4 +35,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <mbgl/util/color.hpp>
#include <mbgl/util/hash.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
class ColorMode {
@@ -69,15 +69,15 @@ public:
}
std::size_t hash() const {
return mbgl::util::hash(blendFunction.which(),
blendColor.r,
blendColor.g,
blendColor.b,
blendColor.a,
mask.r,
mask.g,
mask.b,
mask.a);
return mln::util::hash(blendFunction.which(),
blendColor.r,
blendColor.g,
blendColor.b,
blendColor.a,
mask.r,
mask.g,
mask.b,
mask.a);
}
};
@@ -86,4 +86,4 @@ constexpr bool operator!=(const ColorMode::Mask& a, const ColorMode::Mask& b) {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
#include <string_view>
namespace mbgl {
namespace mln {
namespace gfx {
class RenderPassDescriptor;
@@ -36,4 +36,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -16,7 +16,7 @@
#include <mutex>
#include <shared_mutex>
namespace mbgl {
namespace mln {
class PaintParameters;
class ProgramParameters;
@@ -192,4 +192,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <string>
namespace mbgl {
namespace mln {
namespace gfx {
class ContextObserver {
@@ -17,4 +17,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -1,6 +1,6 @@
#pragma once
namespace mbgl {
namespace mln {
namespace gfx {
template <typename T>
@@ -27,4 +27,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/types.hpp>
#include <mbgl/util/range.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
class DepthMode {
@@ -24,4 +24,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <cstddef>
#include <type_traits>
namespace mbgl {
namespace mln {
namespace gfx {
class DrawMode {
@@ -91,4 +91,4 @@ template <>
struct PrimitiveTypeOf<TriangleStrip> : std::integral_constant<PrimitiveType, PrimitiveType::Triangle> {};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <memory>
#include <cassert>
namespace mbgl {
namespace mln {
namespace gfx {
class DrawScopeResource {
@@ -30,4 +30,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -17,7 +17,7 @@
#include <optional>
#include <vector>
namespace mbgl {
namespace mln {
class Bucket;
class Color;
@@ -83,21 +83,21 @@ public:
virtual void setShader(gfx::ShaderProgramBasePtr value) { shader = std::move(value); }
/// The pass on which we'll be rendered
mbgl::RenderPass getRenderPass() const { return renderPass; }
mln::RenderPass getRenderPass() const { return renderPass; }
/// Sets the render passes
void setRenderPass(mbgl::RenderPass value) { renderPass = value; }
void setRenderPass(mln::RenderPass value) { renderPass = value; }
/// Test whether to draw this drawable in a given render pass.
bool hasRenderPass(const mbgl::RenderPass value) const {
return (mbgl::underlying_type(renderPass) & mbgl::underlying_type(value)) != 0;
bool hasRenderPass(const mln::RenderPass value) const {
return (mln::underlying_type(renderPass) & mln::underlying_type(value)) != 0;
}
/// Test whether to draw this drawable in a given render pass.
/// If multiple render pass bits are set, all must be present.
bool hasAllRenderPasses(const mbgl::RenderPass value) const {
const auto underlying_value = mbgl::underlying_type(value);
return (mbgl::underlying_type(renderPass) & underlying_value) == underlying_value;
bool hasAllRenderPasses(const mln::RenderPass value) const {
const auto underlying_value = mln::underlying_type(value);
return (mln::underlying_type(renderPass) & underlying_value) == underlying_value;
}
/// Width for lines
@@ -259,7 +259,7 @@ public:
const LayerTweakerPtr& getLayerTweaker() const { return layerTweaker; }
/// Get origin point
const std::optional<mbgl::Point<double>>& getOrigin() const { return origin; }
const std::optional<mln::Point<double>>& getOrigin() const { return origin; }
/// Set origin point
void setOrigin(std::optional<Point<double>> p) { origin = std::move(p); }
@@ -288,7 +288,7 @@ protected:
std::string name;
const util::SimpleIdentity uniqueID;
gfx::ShaderProgramBasePtr shader;
mbgl::RenderPass renderPass;
mln::RenderPass renderPass;
std::optional<OverscaledTileID> tileID;
DrawPriority drawPriority = 0;
int32_t lineWidth = 1;
@@ -307,7 +307,7 @@ protected:
LayerTweakerPtr layerTweaker;
std::size_t type = 0;
std::optional<mbgl::Point<double>> origin;
std::optional<mln::Point<double>> origin;
uint32_t uboIndex = 0;
};
@@ -340,4 +340,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <memory>
#include <string>
namespace mbgl {
namespace mln {
class TileAtlasTextures;
using TileAtlasTexturesPtr = std::shared_ptr<TileAtlasTextures>;
@@ -61,4 +61,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <memory>
#include <vector>
namespace mbgl {
namespace mln {
class SegmentBase;
@@ -63,10 +63,10 @@ public:
void setEnabled(bool value) { enabled = value; }
/// The pass on which we'll be rendered
mbgl::RenderPass getRenderPass() const { return renderPass; }
mln::RenderPass getRenderPass() const { return renderPass; }
/// Set the pass on which the drawable will render
void setRenderPass(mbgl::RenderPass value) { renderPass = value; }
void setRenderPass(mln::RenderPass value) { renderPass = value; }
/// The draw priority assigned to generated drawables
DrawPriority getDrawPriority() const;
@@ -229,7 +229,7 @@ protected:
std::string name;
std::string drawableName;
std::size_t vertexAttrId;
mbgl::RenderPass renderPass;
mln::RenderPass renderPass;
bool enabled = true;
bool enableColor = true;
bool enableStencil = false;
@@ -246,7 +246,7 @@ protected:
std::vector<DrawableTweakerPtr> tweakers;
gfx::VertexAttributeArrayPtr vertexAttrs;
gfx::VertexAttributeArrayPtr instanceAttrs;
std::optional<mbgl::Point<double>> origin;
std::optional<mln::Point<double>> origin;
class Impl;
std::unique_ptr<Impl> impl;
@@ -255,4 +255,4 @@ protected:
using UniqueDrawableBuilder = std::unique_ptr<DrawableBuilder>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <string>
namespace mbgl {
namespace mln {
class PaintParameters;
@@ -32,4 +32,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gfx {
@@ -14,4 +14,4 @@ public:
using UniqueDrawableData = std::unique_ptr<DrawableData>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <mbgl/gfx/drawable.hpp>
#include <mbgl/shaders/segment.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
struct Drawable::DrawSegment {
@@ -25,4 +25,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <memory>
namespace mbgl {
namespace mln {
class PaintParameters;
@@ -30,4 +30,4 @@ public:
using DrawableTweakerPtr = std::shared_ptr<DrawableTweaker>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <optional>
#include <mutex>
namespace mbgl {
namespace mln {
namespace gfx {
class Context;
@@ -75,4 +75,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <mbgl/text/glyph.hpp>
#include <mbgl/style/image_impl.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
@@ -47,4 +47,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <mbgl/renderer/buckets/fill_bucket.hpp>
#include <mbgl/renderer/buckets/line_bucket.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
/// Generate fill buffers, without outline
@@ -45,4 +45,4 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
SegmentVector& basicLineSegments);
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
namespace gfx {
/// Graphic primitive type enumeration
@@ -65,4 +65,4 @@ enum class AttributeDataType : uint8_t {
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <optional>
namespace mbgl {
namespace mln {
namespace style {
namespace expression {
class Expression;
@@ -101,4 +101,4 @@ inline auto GPUExpression::evaluate<float>(const float zoom) const {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -14,7 +14,7 @@
#include <functional>
#include <optional>
namespace mbgl {
namespace mln {
namespace gfx {
class PolylineGeneratorDistances {
@@ -52,7 +52,7 @@ public:
using LayoutVertexFunc = std::function<PolylineLayoutVertex(
Point<int16_t> p, Point<double> e, bool round, bool up, int8_t dir, int32_t linesofar /*= 0*/)>;
using CreateSegmentFunc = std::function<PolylineSegment(std::size_t vertexOffset, std::size_t indexOffset)>;
using GetSegmentFunc = std::function<mbgl::SegmentBase&(PolylineSegment& segment)>;
using GetSegmentFunc = std::function<mln::SegmentBase&(PolylineSegment& segment)>;
using Indexes = gfx::IndexVector<gfx::Triangles>;
public:
@@ -100,4 +100,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
#include <cassert>
namespace mbgl {
namespace mln {
namespace gfx {
class RenderableResource {
@@ -56,4 +56,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <cassert>
namespace mbgl {
namespace mln {
namespace gfx {
class RenderbufferResource {
@@ -43,4 +43,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <mutex>
namespace mbgl {
namespace mln {
class ProgramParameters;
class Map;
@@ -52,7 +52,7 @@ public:
/// One-time shader initialization
virtual void initShaders(gfx::ShaderRegistry&, const ProgramParameters&) = 0;
const mbgl::util::SimpleIdentity uniqueID;
const mln::util::SimpleIdentity uniqueID;
protected:
virtual std::unique_ptr<Context> createContext() = 0;
@@ -85,4 +85,4 @@ constexpr bool operator==(const RendererBackend& a, const RendererBackend& b) {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
#include <mbgl/util/color.hpp>
namespace mbgl {
namespace mln {
namespace style {
class Style;
@@ -113,7 +113,7 @@ public:
void create(style::Style& style);
void destroy(style::Style& style);
mbgl::style::SymbolLayer* getLayer(style::Style& style);
mln::style::SymbolLayer* getLayer(style::Style& style);
void update(style::Style& style, const gfx::RenderingStats& stats);
@@ -130,4 +130,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
namespace gfx {
class ScissorRect {
@@ -18,4 +18,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <string_view>
#include <type_traits>
namespace mbgl {
namespace mln {
namespace gfx {
class Shader;
@@ -45,4 +45,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -11,7 +11,7 @@
#include <sstream>
#include <string>
namespace mbgl {
namespace mln {
using StringIDSetsPair = std::pair<unordered_set<std::string_view>, unordered_set<size_t>>;
@@ -176,9 +176,9 @@ protected:
}
private:
mbgl::unordered_map<std::string, std::shared_ptr<gfx::Shader>> programs;
mln::unordered_map<std::string, std::shared_ptr<gfx::Shader>> programs;
mutable std::shared_mutex programLock;
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <string>
#include <unordered_map>
namespace mbgl {
namespace mln {
namespace gfx {
using ShaderGroupPtr = std::shared_ptr<gfx::ShaderGroup>;
@@ -66,4 +66,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/types.hpp>
#include <mbgl/util/variant.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
class StencilMode {
@@ -50,4 +50,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <cstddef>
#include <vector>
namespace mbgl {
namespace mln {
class Size;
@@ -125,4 +125,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
namespace gfx {
/// Color blending equation type
@@ -142,4 +142,4 @@ enum class RenderbufferPixelType : uint8_t {
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <vector>
#include <array>
namespace mbgl {
namespace mln {
namespace gfx {
class Context;
@@ -90,4 +90,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -13,7 +13,7 @@
#include <variant>
#include <vector>
namespace mbgl {
namespace mln {
/// A 2 by 2 matrix
using mat2 = std::array<double, 2 * 2>;
@@ -444,7 +444,7 @@ protected:
/// Copy or share the attribute data from a paint property
template <typename TAttribute, typename TBinder>
static void applyPaintProperty(const std::size_t attrIndex, const UniqueVertexAttribute& attrib, TBinder& binder) {
using Type = typename TAttribute::Type; // ::mbgl::gfx::AttributeType<type_, n_>
using Type = typename TAttribute::Type; // ::mln::gfx::AttributeType<type_, n_>
using InterpType = ZoomInterpolatedAttributeType<Type>;
if (!attrib) {
@@ -486,4 +486,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <memory>
#include <cassert>
namespace mbgl {
namespace mln {
namespace gfx {
class VertexBufferResource {
@@ -39,4 +39,4 @@ protected:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <vector>
#include <memory>
namespace mbgl {
namespace mln {
namespace gl {
class Context;
@@ -174,4 +174,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <memory>
namespace mbgl {
namespace mln {
class SegmentBase;
class PaintParameters;
@@ -71,4 +71,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/drawable_builder.hpp>
#include <mbgl/gl/vertex_attribute_gl.hpp>
namespace mbgl {
namespace mln {
namespace gl {
/**
@@ -26,4 +26,4 @@ protected:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/dynamic_texture.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class Context;
@@ -24,4 +24,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/renderer/layer_group.hpp>
#include <mbgl/gl/uniform_buffer_gl.hpp>
namespace mbgl {
namespace mln {
class PaintParameters;
@@ -48,4 +48,4 @@ protected:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <cstdlib>
namespace mbgl {
namespace mln {
namespace gl {
class RenderableResource : public gfx::RenderableResource {
@@ -19,4 +19,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <mbgl/util/size.hpp>
#include <mbgl/util/util.hpp>
namespace mbgl {
namespace mln {
class ProgramParameters;
@@ -59,4 +59,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gl {
@@ -83,4 +83,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <mbgl/gl/types.hpp>
#include <mbgl/gl/buffer_allocator.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class UniformBufferGL final : public gfx::UniformBuffer {
@@ -73,4 +73,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <mbgl/gl/defines.hpp>
#include <mbgl/platform/gl_functions.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
class VertexBufferResource;
} // namespace gfx
@@ -73,4 +73,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <string>
#include <optional>
namespace mbgl {
namespace mln {
namespace platform {
class Collator {
@@ -22,4 +22,4 @@ private:
};
} // namespace platform
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <cstdint>
#include <string>
namespace mbgl {
namespace mln {
namespace platform {
std::string formatNumber(double number,
@@ -13,4 +13,4 @@ std::string formatNumber(double number,
uint8_t maxFractionDigits);
} // namespace platform
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class BackgroundLayerFactory : public LayerFactory {
protected:
@@ -12,4 +12,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class CircleLayerFactory : public LayerFactory {
protected:
@@ -15,4 +15,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class ColorReliefLayerFactory : public LayerFactory {
protected:
@@ -12,4 +12,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <array>
namespace mbgl {
namespace mln {
class CustomDrawableLayerFactory : public LayerFactory {
protected:
@@ -15,4 +15,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <array>
namespace mbgl {
namespace mln {
class CustomLayerFactory : public LayerFactory {
protected:
@@ -15,4 +15,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class FillExtrusionLayerFactory : public LayerFactory {
protected:
@@ -15,4 +15,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class FillLayerFactory : public LayerFactory {
protected:
@@ -15,4 +15,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class HeatmapLayerFactory : public LayerFactory {
protected:
@@ -14,4 +14,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class HillshadeLayerFactory : public LayerFactory {
protected:
@@ -12,4 +12,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <vector>
namespace mbgl {
namespace mln {
namespace style {
class LayerProperties;
@@ -44,4 +44,4 @@ protected:
std::optional<std::string> getSource(const style::conversion::Convertible& value) const noexcept;
};
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <vector>
namespace mbgl {
namespace mln {
namespace style {
class LayerProperties;
} // namespace style
@@ -74,7 +74,7 @@ public:
* in order to save binary size (the corresponding SDK layer wrappers
* should be excluded from the project build).
*/
virtual void addLayerTypeCoreOnly(std::unique_ptr<mbgl::LayerFactory>);
virtual void addLayerTypeCoreOnly(std::unique_ptr<mln::LayerFactory>);
protected:
virtual ~LayerManager() = default;
@@ -82,4 +82,4 @@ protected:
virtual LayerFactory* getFactory(const style::LayerTypeInfo*) noexcept = 0;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class LineLayerFactory : public LayerFactory {
protected:
@@ -15,4 +15,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class LocationIndicatorLayerFactory : public LayerFactory {
protected:
@@ -12,4 +12,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class RasterLayerFactory : public LayerFactory {
protected:
@@ -12,4 +12,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/layermanager/layer_factory.hpp>
namespace mbgl {
namespace mln {
class SymbolLayerFactory : public LayerFactory {
protected:
@@ -15,4 +15,4 @@ protected:
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <optional>
namespace mbgl {
namespace mln {
/**
* @brief Holds options to limit what parts of a map are visible. All fields are
@@ -55,4 +55,4 @@ struct BoundOptions {
std::optional<double> minPitch;
};
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <functional>
namespace mbgl {
namespace mln {
/** Various options for describing the viewpoint of a map. All fields are
optional.
@@ -115,7 +115,7 @@ struct AnimationOptions {
std::optional<double> minZoom;
/** The easing timing curve of the transition. */
std::optional<mbgl::util::UnitBezier> easing;
std::optional<mln::util::UnitBezier> easing;
/** A function that is called on each frame of the transition, just before a
screen update, except on the last frame. The first parameter indicates
@@ -177,4 +177,4 @@ struct FreeCameraOptions {
void setRollPitchBearing(double roll, double pitch, double bearing) noexcept;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
enum MapChange : uint8_t {
MapChangeRegionWillChange = 0,
@@ -23,4 +23,4 @@ enum MapChange : uint8_t {
MapChangeSourceDidChange = 15
};
} // namespace mbgl
} // namespace mln

View File

@@ -22,7 +22,7 @@
#include <memory>
#include <optional>
namespace mbgl {
namespace mln {
class RendererFrontend;
class TransformState;
@@ -217,4 +217,4 @@ protected:
Map(std::unique_ptr<Impl>, const util::ActionJournalOptions& = {});
};
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
#include <cstdint>
#include <string>
namespace mbgl {
namespace mln {
namespace gfx {
class ShaderRegistry;
@@ -98,4 +98,4 @@ public:
virtual void onSymbolError(const std::string&) {}
};
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <memory>
namespace mbgl {
namespace mln {
/**
* @brief Holds values for Map options.
@@ -33,7 +33,7 @@ public:
/**
* @brief Gets the previously set (or default) map mode.
* @return Returns a #mbgl::MapMode
* @return Returns a #mln::MapMode
*/
MapMode mapMode() const;
@@ -154,4 +154,4 @@ private:
std::unique_ptr<Impl> impl_;
};
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
namespace mbgl {
namespace mln {
class Transform;
@@ -27,4 +27,4 @@ private:
std::unique_ptr<Transform> transform;
};
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
using EnumType = uint32_t;
@@ -53,26 +53,26 @@ enum class MapDebugOptions : EnumType {
constexpr MapDebugOptions operator|(MapDebugOptions lhs, MapDebugOptions rhs) {
// NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
return MapDebugOptions(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs));
return MapDebugOptions(mln::underlying_type(lhs) | mln::underlying_type(rhs));
}
constexpr MapDebugOptions& operator|=(MapDebugOptions& lhs, MapDebugOptions rhs) {
// NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
return (lhs = MapDebugOptions(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs)));
return (lhs = MapDebugOptions(mln::underlying_type(lhs) | mln::underlying_type(rhs)));
}
constexpr bool operator&(MapDebugOptions lhs, MapDebugOptions rhs) {
return mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs);
return mln::underlying_type(lhs) & mln::underlying_type(rhs);
}
constexpr MapDebugOptions& operator&=(MapDebugOptions& lhs, MapDebugOptions rhs) {
// NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
return (lhs = MapDebugOptions(mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs)));
return (lhs = MapDebugOptions(mln::underlying_type(lhs) & mln::underlying_type(rhs)));
}
constexpr MapDebugOptions operator~(MapDebugOptions value) {
// NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
return MapDebugOptions(~mbgl::underlying_type(value));
return MapDebugOptions(~mln::underlying_type(value));
}
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <functional>
#include <optional>
namespace mbgl {
namespace mln {
/**
* @brief Holds values for Axonometric rendering. All fields are
@@ -39,4 +39,4 @@ struct ProjectionMode {
std::optional<double> ySkew;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <numbers>
namespace mbgl {
namespace mln {
namespace util {
/**
@@ -46,4 +46,4 @@ constexpr float rad2degf(float rad) noexcept {
}
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <type_traits>
namespace mbgl {
namespace mln {
namespace util {
template <typename T>
@@ -13,4 +13,4 @@ auto clamp(std::enable_if_t<std::is_scalar_v<T>, T> value, T min_, T max_) noexc
}
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <android/api-level.h>
#endif
namespace mbgl {
namespace mln {
namespace util {
/// Computes the log2(x) rounded up to the next integer.
@@ -27,7 +27,7 @@ T log2(T x) {
}
} // namespace util
} // namespace mbgl
} // namespace mln
// log2 is not available on Android before API 18.
#if defined(__ANDROID__) && defined(__GNUC__) && defined(__ANDROID_API__) && __ANDROID_API__ < 18

View File

@@ -4,7 +4,7 @@
#include <algorithm>
#include <cmath>
namespace mbgl {
namespace mln {
namespace util {
template <typename T>
@@ -50,4 +50,4 @@ T min(T a, T b, Ts... args)
}
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <cmath>
namespace mbgl {
namespace mln {
namespace util {
/// Constrains n to the given range (including min, excluding max) via modular
@@ -21,4 +21,4 @@ T wrap(T value, T min, T max) {
}
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <Metal/MTLBuffer.hpp>
#include <Metal/MTLDevice.hpp>
namespace mbgl {
namespace mln {
namespace mtl {
class Context;
@@ -92,4 +92,4 @@ protected:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <unordered_set>
#include <vector>
namespace mbgl {
namespace mln {
namespace gfx {
class Renderable;
} // namespace gfx
@@ -69,9 +69,9 @@ protected:
std::vector<GroupEntry> debugGroupNames;
std::vector<gfx::DebugGroup<gfx::RenderPass>> renderDebugGroups;
std::vector<gfx::DebugGroup<gfx::UploadPass>> uploadDebugGroups;
mbgl::unordered_set<RenderPass*> renderPasses;
mbgl::unordered_set<UploadPass*> uploadPasses;
mln::unordered_set<RenderPass*> renderPasses;
mln::unordered_set<UploadPass*> uploadPasses;
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -17,7 +17,7 @@
#include <unordered_map>
#include <vector>
namespace mbgl {
namespace mln {
class ProgramParameters;
class RenderStaticData;
@@ -72,7 +72,7 @@ public:
std::string_view vertexName,
std::string_view fragmentName,
const ProgramParameters& programParameters,
const mbgl::unordered_map<std::string, std::string>& additionalDefines);
const mln::unordered_map<std::string, std::string>& additionalDefines);
MTLTexturePtr createMetalTexture(MTLTextureDescriptorPtr textureDescriptor) const;
MTLSamplerStatePtr createMetalSamplerState(MTLSamplerDescriptorPtr samplerDescriptor) const;
@@ -179,4 +179,4 @@ private:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <memory>
namespace mbgl {
namespace mln {
template <class AttributeList>
class Segment;
@@ -83,4 +83,4 @@ protected:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/drawable_builder.hpp>
namespace mbgl {
namespace mln {
namespace mtl {
/**
@@ -25,4 +25,4 @@ protected:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/dynamic_texture.hpp>
namespace mbgl {
namespace mln {
namespace mtl {
class Context;
@@ -15,4 +15,4 @@ public:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/index_buffer.hpp>
#include <mbgl/mtl/buffer_resource.hpp>
namespace mbgl {
namespace mln {
namespace mtl {
class IndexBufferResource : public gfx::IndexBufferResource {
@@ -24,4 +24,4 @@ protected:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/renderer/layer_group.hpp>
#include <mbgl/mtl/uniform_buffer.hpp>
namespace mbgl {
namespace mln {
class PaintParameters;
@@ -14,7 +14,7 @@ class RenderPass;
/**
A layer group for non-tile-based drawables
*/
class LayerGroup : public mbgl::LayerGroup {
class LayerGroup : public mln::LayerGroup {
public:
LayerGroup(int32_t layerIndex, std::size_t initialCapacity, std::string name);
~LayerGroup() override {}
@@ -31,4 +31,4 @@ protected:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -38,7 +38,7 @@ class VertexBufferLayoutDescriptor;
class VertexDescriptor;
} // namespace MTL
namespace mbgl {
namespace mln {
namespace mtl {
using CAMetalDrawablePtr = NS::SharedPtr<CA::MetalDrawable>;
@@ -64,4 +64,4 @@ using MTLVertexAttributeDescriptorPtr = NS::SharedPtr<MTL::VertexAttributeDescri
using MTLVertexBufferLayoutDescriptorPtr = NS::SharedPtr<MTL::VertexBufferLayoutDescriptor>;
using MTLVertexDescriptorPtr = NS::SharedPtr<MTL::VertexDescriptor>;
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/offscreen_texture.hpp>
#include <mbgl/gfx/types.hpp>
namespace mbgl {
namespace mln {
namespace mtl {
class Context;
@@ -20,4 +20,4 @@ public:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <memory>
#include <optional>
namespace mbgl {
namespace mln {
namespace mtl {
class BufferResource;
@@ -102,4 +102,4 @@ private:
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <cstdlib>
namespace mbgl {
namespace mln {
namespace mtl {
class RendererBackend;
@@ -20,11 +20,11 @@ public:
// explicitly can override this method.
}
virtual const mbgl::mtl::RendererBackend& getBackend() const = 0;
virtual const mbgl::mtl::MTLCommandBufferPtr& getCommandBuffer() const = 0;
virtual mbgl::mtl::MTLBlitPassDescriptorPtr getUploadPassDescriptor() const = 0;
virtual const mbgl::mtl::MTLRenderPassDescriptorPtr& getRenderPassDescriptor() const = 0;
virtual const mln::mtl::RendererBackend& getBackend() const = 0;
virtual const mln::mtl::MTLCommandBufferPtr& getCommandBuffer() const = 0;
virtual mln::mtl::MTLBlitPassDescriptorPtr getUploadPassDescriptor() const = 0;
virtual const mln::mtl::MTLRenderPassDescriptorPtr& getRenderPassDescriptor() const = 0;
};
} // namespace mtl
} // namespace mbgl
} // namespace mln

Some files were not shown because too many files have changed in this diff Show More