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

@@ -6,7 +6,7 @@
#include <cassert>
namespace mbgl {
namespace mln {
Mailbox::Mailbox() = default;
@@ -167,4 +167,4 @@ void Mailbox::scheduleToRecieve(const std::optional<util::SimpleIdentity>& tag)
}
}
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/util/thread_pool.hpp>
#include <mbgl/util/run_loop.hpp>
namespace mbgl {
namespace mln {
std::function<void()> Scheduler::bindOnce(std::function<void()> fn) {
assert(fn);
@@ -67,4 +67,4 @@ std::shared_ptr<Scheduler> Scheduler::GetSequenced() {
}
}
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <unordered_set>
#include <optional>
namespace mbgl {
namespace mln {
namespace algorithm {
template <typename GetTileFn,
@@ -160,4 +160,4 @@ void updateRenderables(GetTileFn getTile,
}
} // namespace algorithm
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <functional>
#include <algorithm>
namespace mbgl {
namespace mln {
namespace algorithm {
template <typename T>
@@ -140,4 +140,4 @@ void updateTileMasks(RenderableTilesMap& renderables) {
}
} // namespace algorithm
} // namespace mbgl
} // namespace mln

View File

@@ -28,7 +28,7 @@
return result; \
}
namespace mbgl {
namespace mln {
using namespace style;
@@ -270,4 +270,4 @@ double AnnotationManager::getTopOffsetPixelsForImage(const std::string& id_) {
return it != images.end() ? -(it->second.getImage().size.height / it->second.getPixelRatio()) / 2 : 0.0;
}
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
#include <unordered_map>
#include <unordered_set>
namespace mbgl {
namespace mln {
class LatLngBounds;
class AnnotationTile;
@@ -94,4 +94,4 @@ private:
// Do not add members here, see `WeakPtrFactory`
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/annotation/annotation_source.hpp>
#include <mbgl/style/layer.hpp>
namespace mbgl {
namespace mln {
using namespace style;
@@ -24,7 +24,7 @@ std::optional<std::string> AnnotationSource::Impl::getAttribution() const {
return {};
}
bool AnnotationSource::supportsLayerType(const mbgl::style::LayerTypeInfo* info) const {
bool AnnotationSource::supportsLayerType(const mln::style::LayerTypeInfo* info) const {
return !std::strcmp(info->type, "line") || !std::strcmp(info->type, "symbol") || !std::strcmp(info->type, "fill");
}
@@ -32,4 +32,4 @@ Mutable<Source::Impl> AnnotationSource::createMutable() const noexcept {
return staticMutableCast<Source::Impl>(makeMutable<Impl>(impl()));
}
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/style/source.hpp>
#include <mbgl/style/source_impl.hpp>
namespace mbgl {
namespace mln {
// NOTE: Any derived class must invalidate `weakFactory` in the destructor
class AnnotationSource final : public style::Source {
@@ -18,7 +18,7 @@ protected:
private:
void loadDescription(FileSource&) final;
bool supportsLayerType(const mbgl::style::LayerTypeInfo*) const override;
bool supportsLayerType(const mln::style::LayerTypeInfo*) const override;
mapbox::base::WeakPtr<Source> makeWeakPtr() override { return weakFactory.makeWeakPtr(); }
mapbox::base::WeakPtrFactory<Source> weakFactory{this};
// Do not add members here, see `WeakPtrFactory`
@@ -31,4 +31,4 @@ public:
std::optional<std::string> getAttribution() const final;
};
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <utility>
namespace mbgl {
namespace mln {
AnnotationTile::AnnotationTile(const OverscaledTileID& overscaledTileID,
const TileParameters& parameters,
@@ -118,4 +118,4 @@ std::unique_ptr<AnnotationTileLayer> AnnotationTileData::addLayer(const std::str
return std::make_unique<AnnotationTileLayer>(it->second);
}
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <mbgl/tile/geometry_tile.hpp>
#include <mbgl/tile/geometry_tile_data.hpp>
namespace mbgl {
namespace mln {
class AnnotationManager;
class TileParameters;
@@ -64,4 +64,4 @@ private:
std::unordered_map<std::string, std::shared_ptr<AnnotationTileLayerData>> layers;
};
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/style/style_impl.hpp>
#include <mbgl/style/layers/fill_layer.hpp>
namespace mbgl {
namespace mln {
using namespace style;
@@ -33,4 +33,4 @@ const ShapeAnnotationGeometry& FillAnnotationImpl::geometry() const {
return annotation.geometry;
}
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/annotation/shape_annotation_impl.hpp>
#include <mbgl/annotation/annotation.hpp>
namespace mbgl {
namespace mln {
class FillAnnotationImpl : public ShapeAnnotationImpl {
public:
@@ -16,4 +16,4 @@ private:
const FillAnnotation annotation;
};
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/style/style_impl.hpp>
#include <mbgl/style/layers/line_layer.hpp>
namespace mbgl {
namespace mln {
using namespace style;
@@ -34,4 +34,4 @@ const ShapeAnnotationGeometry& LineAnnotationImpl::geometry() const {
return annotation.geometry;
}
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/annotation/shape_annotation_impl.hpp>
#include <mbgl/annotation/annotation.hpp>
namespace mbgl {
namespace mln {
class LineAnnotationImpl : public ShapeAnnotationImpl {
public:
@@ -16,4 +16,4 @@ private:
const LineAnnotation annotation;
};
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <mbgl/layermanager/layer_manager.hpp>
namespace mbgl {
namespace mln {
using namespace style;
@@ -60,4 +60,4 @@ std::vector<Feature> RenderAnnotationSource::querySourceFeatures(const SourceQue
return {};
}
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/annotation/annotation_source.hpp>
#include <mbgl/renderer/sources/render_tile_source.hpp>
namespace mbgl {
namespace mln {
class RenderAnnotationSource final : public RenderTileSource {
public:
@@ -28,4 +28,4 @@ private:
const AnnotationSource::Impl& impl() const;
};
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <mbgl/util/constants.hpp>
#include <mbgl/util/geometry.hpp>
namespace mbgl {
namespace mln {
using namespace style;
@@ -55,4 +55,4 @@ void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, Annotati
}
}
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <string>
#include <memory>
namespace mbgl {
namespace mln {
class AnnotationTileData;
class CanonicalTileID;
@@ -31,10 +31,10 @@ public:
};
struct CloseShapeAnnotation {
ShapeAnnotationGeometry operator()(const mbgl::LineString<double> &geom) const { return geom; }
ShapeAnnotationGeometry operator()(const mbgl::MultiLineString<double> &geom) const { return geom; }
ShapeAnnotationGeometry operator()(const mbgl::Polygon<double> &geom) const {
mbgl::Polygon<double> closed = geom;
ShapeAnnotationGeometry operator()(const mln::LineString<double> &geom) const { return geom; }
ShapeAnnotationGeometry operator()(const mln::MultiLineString<double> &geom) const { return geom; }
ShapeAnnotationGeometry operator()(const mln::Polygon<double> &geom) const {
mln::Polygon<double> closed = geom;
for (auto &ring : closed) {
if (!ring.empty() && ring.front() != ring.back()) {
ring.emplace_back(ring.front());
@@ -42,8 +42,8 @@ struct CloseShapeAnnotation {
}
return closed;
}
ShapeAnnotationGeometry operator()(const mbgl::MultiPolygon<double> &geom) const {
mbgl::MultiPolygon<double> closed = geom;
ShapeAnnotationGeometry operator()(const mln::MultiPolygon<double> &geom) const {
mln::MultiPolygon<double> closed = geom;
for (auto &polygon : closed) {
for (auto &ring : polygon) {
if (!ring.empty() && ring.front() != ring.back()) {
@@ -55,4 +55,4 @@ struct CloseShapeAnnotation {
}
};
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <mbgl/math/clamp.hpp>
#include <mbgl/util/tile_coordinate.hpp>
namespace mbgl {
namespace mln {
SymbolAnnotationImpl::SymbolAnnotationImpl(AnnotationID id_, SymbolAnnotation annotation_)
: id(id_),
@@ -20,4 +20,4 @@ void SymbolAnnotationImpl::updateLayer(const CanonicalTileID& tileID, Annotation
layer.addFeature(id, FeatureType::Point, GeometryCollection{{{{tilePoint}}}}, featureProperties);
}
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
#include <boost/geometry/geometries/register/box.hpp>
#include <boost/geometry/index/rtree.hpp>
namespace mbgl {
namespace mln {
class AnnotationTileLayer;
class CanonicalTileID;
@@ -27,7 +27,7 @@ public:
const SymbolAnnotation annotation;
};
} // namespace mbgl
} // namespace mln
namespace boost {
namespace geometry {
@@ -36,62 +36,62 @@ namespace geometry {
namespace traits {
template <>
struct tag<mbgl::LatLng> {
struct tag<mln::LatLng> {
using type = point_tag;
};
template <>
struct dimension<mbgl::LatLng> : boost::mpl::int_<2> {};
struct dimension<mln::LatLng> : boost::mpl::int_<2> {};
template <>
struct coordinate_type<mbgl::LatLng> {
struct coordinate_type<mln::LatLng> {
using type = double;
};
template <>
struct coordinate_system<mbgl::LatLng> {
struct coordinate_system<mln::LatLng> {
using type = boost::geometry::cs::cartesian;
};
template <>
struct access<mbgl::LatLng, 0> {
static inline double get(mbgl::LatLng const& p) { return p.longitude(); }
struct access<mln::LatLng, 0> {
static inline double get(mln::LatLng const& p) { return p.longitude(); }
};
template <>
struct access<mbgl::LatLng, 1> {
static inline double get(mbgl::LatLng const& p) { return p.latitude(); }
struct access<mln::LatLng, 1> {
static inline double get(mln::LatLng const& p) { return p.latitude(); }
};
template <>
struct tag<mbgl::LatLngBounds> {
struct tag<mln::LatLngBounds> {
using type = box_tag;
};
template <>
struct point_type<mbgl::LatLngBounds> {
using type = mbgl::LatLng;
struct point_type<mln::LatLngBounds> {
using type = mln::LatLng;
};
template <size_t D>
struct indexed_access<mbgl::LatLngBounds, min_corner, D> {
using ct = coordinate_type<mbgl::LatLng>::type;
static inline ct get(mbgl::LatLngBounds const& b) { return geometry::get<D>(b.southwest()); }
static inline void set(mbgl::LatLngBounds& b, ct const& value) { geometry::set<D>(b.southwest(), value); }
struct indexed_access<mln::LatLngBounds, min_corner, D> {
using ct = coordinate_type<mln::LatLng>::type;
static inline ct get(mln::LatLngBounds const& b) { return geometry::get<D>(b.southwest()); }
static inline void set(mln::LatLngBounds& b, ct const& value) { geometry::set<D>(b.southwest(), value); }
};
template <size_t D>
struct indexed_access<mbgl::LatLngBounds, max_corner, D> {
using ct = coordinate_type<mbgl::LatLng>::type;
static inline ct get(mbgl::LatLngBounds const& b) { return geometry::get<D>(b.northeast()); }
static inline void set(mbgl::LatLngBounds& b, ct const& value) { geometry::set<D>(b.northeast(), value); }
struct indexed_access<mln::LatLngBounds, max_corner, D> {
using ct = coordinate_type<mln::LatLng>::type;
static inline ct get(mln::LatLngBounds const& b) { return geometry::get<D>(b.northeast()); }
static inline void set(mln::LatLngBounds& b, ct const& value) { geometry::set<D>(b.northeast(), value); }
};
} // namespace traits
// Tell Boost Geometry how to access a std::shared_ptr<mbgl::SymbolAnnotation> object.
// Tell Boost Geometry how to access a std::shared_ptr<mln::SymbolAnnotation> object.
namespace index {
template <>
struct indexable<std::shared_ptr<const mbgl::SymbolAnnotationImpl>> {
using result_type = mbgl::LatLng;
mbgl::LatLng operator()(const std::shared_ptr<const mbgl::SymbolAnnotationImpl>& v) const {
const mbgl::Point<double>& p = v->annotation.geometry;
struct indexable<std::shared_ptr<const mln::SymbolAnnotationImpl>> {
using result_type = mln::LatLng;
mln::LatLng operator()(const std::shared_ptr<const mln::SymbolAnnotationImpl>& v) const {
const mln::Point<double>& p = v->annotation.geometry;
return {p.y, p.x};
}
};

View File

@@ -6,7 +6,7 @@
#include <vector>
#include <optional>
namespace mbgl {
namespace mln {
class Anchor {
public:
@@ -22,4 +22,4 @@ public:
using Anchors = std::vector<Anchor>;
} // namespace mbgl
} // namespace mln

View File

@@ -1,7 +1,7 @@
#include <mbgl/geometry/dem_data.hpp>
#include <mbgl/math/clamp.hpp>
namespace mbgl {
namespace mln {
DEMData::DEMData(const PremultipliedImage& _image, Tileset::RasterEncoding _encoding)
: dim(_image.size.height),
@@ -102,4 +102,4 @@ const std::array<float, 4>& DEMData::getUnpackVector() const {
return encoding == Tileset::RasterEncoding::Terrarium ? unpackTerrarium : unpackMapbox;
}
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <cassert>
#include <vector>
namespace mbgl {
namespace mln {
class DEMData {
public:
@@ -38,4 +38,4 @@ private:
}
};
} // namespace mbgl
} // namespace mln

View File

@@ -18,20 +18,20 @@
#include <string>
namespace {
mbgl::LatLng screenCoordinateToLatLng(mbgl::ScreenCoordinate point,
const mbgl::TransformState& state,
mbgl::LatLng::WrapMode wrapMode = mbgl::LatLng::Wrapped) {
mln::LatLng screenCoordinateToLatLng(mln::ScreenCoordinate point,
const mln::TransformState& state,
mln::LatLng::WrapMode wrapMode = mln::LatLng::Wrapped) {
point.y = state.getSize().height - point.y;
return state.screenCoordinateToLatLng(point, wrapMode);
}
mbgl::Point<double> project(const mbgl::LatLng& coordinate, const mbgl::TransformState& state) {
mbgl::LatLng unwrappedLatLng = coordinate.wrapped();
unwrappedLatLng.unwrapForShortestPath(state.getLatLng(mbgl::LatLng::Wrapped));
return mbgl::Projection::project(unwrappedLatLng, state.getScale());
mln::Point<double> project(const mln::LatLng& coordinate, const mln::TransformState& state) {
mln::LatLng unwrappedLatLng = coordinate.wrapped();
unwrappedLatLng.unwrapForShortestPath(state.getLatLng(mln::LatLng::Wrapped));
return mln::Projection::project(unwrappedLatLng, state.getScale());
}
} // namespace
namespace mbgl {
namespace mln {
constexpr auto expectedUniqueLayerIDs = 10;
constexpr auto expectedUniqueLeaderIDs = 30;
@@ -337,23 +337,23 @@ void FeatureIndex::setBucketLayerIDs(const std::string& bucketLeaderID, const st
DynamicFeatureIndex::~DynamicFeatureIndex() = default;
void DynamicFeatureIndex::query(std::unordered_map<std::string, std::vector<Feature>>& result,
const mbgl::ScreenLineString& queryGeometry,
const mln::ScreenLineString& queryGeometry,
const TransformState& state) const {
if (features.empty()) return;
mbgl::GeometryBBox<int64_t> queryBox = DefaultWithinBBox;
mln::GeometryBBox<int64_t> queryBox = DefaultWithinBBox;
for (const auto& p : queryGeometry) {
const LatLng c = screenCoordinateToLatLng(p, state);
const Point<double> pm = project(c, state);
const Point<int64_t> coord = {int64_t(pm.x), int64_t(pm.y)};
mbgl::updateBBox(queryBox, coord);
mln::updateBBox(queryBox, coord);
}
for (const auto& f : features) {
// hit testing
mbgl::GeometryBBox<int64_t> featureBox = DefaultWithinBBox;
for (const auto& p : f.envelope->front()) mbgl::updateBBox(featureBox, p);
mln::GeometryBBox<int64_t> featureBox = DefaultWithinBBox;
for (const auto& p : f.envelope->front()) mln::updateBBox(featureBox, p);
const bool hit = mbgl::boxWithinBox(featureBox, queryBox) || mbgl::boxWithinBox(queryBox, featureBox);
const bool hit = mln::boxWithinBox(featureBox, queryBox) || mln::boxWithinBox(queryBox, featureBox);
if (hit) {
assert(f.feature);
result[f.feature->sourceLayer].push_back(*f.feature);
@@ -366,4 +366,4 @@ void DynamicFeatureIndex::insert(std::shared_ptr<Feature> feature,
features.push_back({std::move(feature), std::move(envelope)});
}
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
#include <string>
#include <unordered_map>
namespace mbgl {
namespace mln {
class RenderedQueryOptions;
class RenderLayer;
@@ -90,7 +90,7 @@ class DynamicFeatureIndex {
public:
~DynamicFeatureIndex();
void query(std::unordered_map<std::string, std::vector<Feature>>& result,
const mbgl::ScreenLineString& queryGeometry,
const mln::ScreenLineString& queryGeometry,
const TransformState& state) const;
void insert(std::shared_ptr<Feature> feature, std::shared_ptr<mapbox::geometry::polygon<int64_t>> envelope);
@@ -160,7 +160,7 @@ private:
GridIndex<RefIndexedSubfeature> grid;
unsigned int sortIndex = 0;
// mbgl::unordered_* cannot be used here, as we rely on holding references to elements:
// mln::unordered_* cannot be used here, as we rely on holding references to elements:
// 22.2.7 Unordered associative containers [unord.req]
// The insert and emplace members shall not affect the validity of references to
// container elements, but may invalidate all iterators to the container.
@@ -168,4 +168,4 @@ private:
std::unordered_set<std::string> uniqueLayerIDs;
std::unique_ptr<const GeometryTileData> tileData;
};
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <mbgl/util/logging.hpp>
#include <mbgl/util/platform.hpp>
namespace mbgl {
namespace mln {
namespace {
size_t getDashPatternHash(const std::vector<float>& dasharray, const LinePatternCap patternCap) {
@@ -261,4 +261,4 @@ void LineAtlas::upload(gfx::UploadPass& uploadPass) {
needsUpload.clear();
}
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <memory>
#include <vector>
namespace mbgl {
namespace mln {
namespace gfx {
class UploadPass;
@@ -80,4 +80,4 @@ private:
std::vector<size_t> needsUpload;
};
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <limits>
#include <cassert>
namespace mbgl {
namespace mln {
namespace gfx {
std::optional<AttributeBinding> offsetAttributeBinding(const std::optional<AttributeBinding>& binding,
@@ -19,4 +19,4 @@ std::optional<AttributeBinding> offsetAttributeBinding(const std::optional<Attri
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -11,12 +11,12 @@
#include <cstddef>
#include <optional>
#define MBGL_DEFINE_ATTRIBUTE(type_, n_, name_) \
struct name_ { \
using Type = ::mbgl::gfx::AttributeType<type_, n_>; \
static constexpr auto name() { \
return #name_; \
} \
#define MBGL_DEFINE_ATTRIBUTE(type_, n_, name_) \
struct name_ { \
using Type = ::mln::gfx::AttributeType<type_, n_>; \
static constexpr auto name() { \
return #name_; \
} \
}
#if defined(_MSC_VER) && !defined(__clang__)
@@ -25,7 +25,7 @@
#define MBGL_VERTEX_ALIGN __attribute__((aligned(4)))
#endif
namespace mbgl {
namespace mln {
namespace gfx {
template <typename, std::size_t>
@@ -330,4 +330,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gfx {
struct CollisionDrawableData : public DrawableData {
@@ -21,4 +21,4 @@ struct CollisionDrawableData : public DrawableData {
using UniqueCollisionDrawableData = std::unique_ptr<CollisionDrawableData>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/drawable_data.hpp>
#include <mbgl/shaders/color_relief_layer_ubo.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
/**
@@ -23,4 +23,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/types.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
class CullFaceMode {
@@ -21,4 +21,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <mbgl/renderer/render_tile.hpp>
#include <mbgl/renderer/render_pass.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
struct Drawable::Impl {
@@ -24,7 +24,7 @@ struct Drawable::Impl {
Drawable::Drawable(std::string name_)
: name(name_),
renderPass(mbgl::RenderPass::Opaque),
renderPass(mln::RenderPass::Opaque),
depthType(DepthMaskType::ReadOnly),
impl(std::make_unique<Impl>()) {}
@@ -91,4 +91,4 @@ void Drawable::setRenderTile(Immutable<std::vector<RenderTile>> renderTiles_, co
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <mbgl/shaders/shader_program_base.hpp>
#include <mbgl/renderer/paint_parameters.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
void DrawableAtlasesTweaker::setupTextures(gfx::Drawable& drawable, const bool linearFilterForIcons) {
@@ -46,4 +46,4 @@ void DrawableAtlasesTweaker::execute(gfx::Drawable& drawable, PaintParameters& p
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -7,13 +7,13 @@
#include <mbgl/util/logging.hpp>
#include <mbgl/gfx/gfx_types.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
DrawableBuilder::DrawableBuilder(std::string name_)
: name(std::move(name_)),
vertexAttrId(0),
renderPass(mbgl::RenderPass::Opaque),
renderPass(mln::RenderPass::Opaque),
impl(std::make_unique<Impl>()) {}
DrawableBuilder::~DrawableBuilder() = default;
@@ -310,4 +310,4 @@ void DrawableBuilder::addWideVectorPolylineGlobal(const LineString<double>& coor
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <string>
namespace mbgl {
namespace mln {
namespace gfx {
using namespace shaders;
@@ -127,9 +127,9 @@ void DrawableBuilder::Impl::addWideVectorPolylineLocal(gfx::DrawableBuilder& /*b
}
}
mbgl::Point<double> DrawableBuilder::Impl::addWideVectorPolylineGlobal(gfx::DrawableBuilder& /*builder*/,
const LineString<double>& coordinates,
const gfx::PolylineGeneratorOptions& options) {
mln::Point<double> DrawableBuilder::Impl::addWideVectorPolylineGlobal(gfx::DrawableBuilder& /*builder*/,
const LineString<double>& coordinates,
const gfx::PolylineGeneratorOptions& options) {
constexpr int32_t zoom = 0;
// get center
@@ -138,7 +138,7 @@ mbgl::Point<double> DrawableBuilder::Impl::addWideVectorPolylineGlobal(gfx::Draw
Point<double> minPoint{maxd, maxd}, maxPoint{mind, mind};
for (const auto& coord : coordinates) {
auto merc = Projection::project(LatLng(coord.y, coord.x), zoom);
Point<double> pSource{merc.x * mbgl::util::EXTENT, merc.y * mbgl::util::EXTENT};
Point<double> pSource{merc.x * mln::util::EXTENT, merc.y * mln::util::EXTENT};
minPoint.x = std::min(pSource.x, minPoint.x);
minPoint.y = std::min(pSource.y, minPoint.y);
maxPoint.x = std::max(pSource.x, maxPoint.x);
@@ -152,7 +152,7 @@ mbgl::Point<double> DrawableBuilder::Impl::addWideVectorPolylineGlobal(gfx::Draw
int index = 0;
for (const auto& coord : coordinates) {
auto merc = Projection::project(LatLng(coord.y, coord.x), zoom);
Point<double> pSource{merc.x * mbgl::util::EXTENT, merc.y * mbgl::util::EXTENT};
Point<double> pSource{merc.x * mln::util::EXTENT, merc.y * mln::util::EXTENT};
pSource.x -= pCenter.x;
pSource.y -= pCenter.y;
VertexTriWideVecInstance data;
@@ -294,8 +294,8 @@ bool DrawableBuilder::Impl::checkAndSetMode(Mode target) {
return "Unknown"; // Handle unknown enum values if needed
}
};
mbgl::Log::Error(
mbgl::Event::General,
mln::Log::Error(
mln::Event::General,
"DrawableBuilder mode mismatch. Target is "s + to_string(target) + ", current is " + to_string(mode));
// the builder is building in a different mode
@@ -308,4 +308,4 @@ bool DrawableBuilder::Impl::checkAndSetMode(Mode target) {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -15,7 +15,7 @@
#include <vector>
#include <algorithm>
namespace mbgl {
namespace mln {
namespace gfx {
class DrawableBuilder::Impl {
@@ -65,9 +65,9 @@ public:
const GeometryCoordinates& coordinates,
const gfx::PolylineGeneratorOptions& options);
mbgl::Point<double> addWideVectorPolylineGlobal(gfx::DrawableBuilder& builder,
const LineString<double>& coordinates,
const gfx::PolylineGeneratorOptions& options);
mln::Point<double> addWideVectorPolylineGlobal(gfx::DrawableBuilder& builder,
const LineString<double>& coordinates,
const gfx::PolylineGeneratorOptions& options);
void setupForWideVectors(gfx::Context&, gfx::DrawableBuilder&);
@@ -100,4 +100,4 @@ private:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -16,11 +16,11 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gfx {
void DrawableCustomLayerHostTweaker::execute([[maybe_unused]] gfx::Drawable& drawable,
mbgl::PaintParameters& paintParameters) {
mln::PaintParameters& paintParameters) {
// custom drawing
auto& context = paintParameters.context;
context.resetState(paintParameters.depthModeForSublayer(0, gfx::DepthMaskType::ReadOnly),
@@ -48,4 +48,4 @@ void DrawableCustomLayerHostTweaker::execute([[maybe_unused]] gfx::Drawable& dra
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/texture2d.hpp>
#include <mbgl/gfx/context.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
DynamicTexture::DynamicTexture(Size size, TexturePixelType pixelType)
@@ -76,4 +76,4 @@ bool DynamicTexture::removeTexture(const TextureHandle& texHandle) {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <algorithm>
#include <cmath>
namespace mbgl {
namespace mln {
namespace gfx {
constexpr const uint16_t extraPadding = 1;
@@ -260,4 +260,4 @@ void DynamicTextureAtlas::removeUnusedDynamicTextures() {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -18,18 +18,18 @@
namespace mapbox {
namespace util {
template <>
struct nth<0, mbgl::GeometryCoordinate> {
static int64_t get(const mbgl::GeometryCoordinate& t) { return t.x; };
struct nth<0, mln::GeometryCoordinate> {
static int64_t get(const mln::GeometryCoordinate& t) { return t.x; };
};
template <>
struct nth<1, mbgl::GeometryCoordinate> {
static int64_t get(const mbgl::GeometryCoordinate& t) { return t.y; };
struct nth<1, mln::GeometryCoordinate> {
static int64_t get(const mln::GeometryCoordinate& t) { return t.y; };
};
} // namespace util
} // namespace mapbox
namespace mbgl {
namespace mln {
namespace gfx {
struct GeometryTooLongException : std::exception {};
@@ -245,4 +245,4 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <algorithm>
namespace mbgl {
namespace mln {
namespace gfx {
using namespace style::expression;
@@ -184,4 +184,4 @@ Color GPUExpression::evaluateColor(const float zoom) const {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gfx {
@@ -24,4 +24,4 @@ public:
using UniqueHillshadePrepareDrawableData = std::unique_ptr<HillshadePrepareDrawableData>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gfx {
@@ -20,4 +20,4 @@ public:
using UniqueImageDrawableData = std::unique_ptr<ImageDrawableData>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

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

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <vector>
namespace mbgl {
namespace mln {
namespace gfx {
struct IndexBufferBase {
@@ -109,4 +109,4 @@ public:
using IndexVectorBasePtr = std::shared_ptr<IndexVectorBase>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gfx {
@@ -20,4 +20,4 @@ public:
using UniqueLineDrawableData = std::unique_ptr<LineDrawableData>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/renderable.hpp>
#include <mbgl/util/image.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
class Texture;
@@ -26,4 +26,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
using namespace std::numbers;
namespace mbgl {
namespace mln {
namespace gfx {
namespace {
@@ -640,4 +640,4 @@ template class PolylineGenerator<gfx::DrawableBuilder::Impl::LineLayoutVertex,
template class PolylineGenerator<LineLayoutVertex, SegmentBase>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
namespace gfx {
class RenderPassDescriptor {
@@ -40,4 +40,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/backend_scope.hpp>
#include <mbgl/gfx/context.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
RendererBackend::RendererBackend(const ContextMode contextMode_)
@@ -23,4 +23,4 @@ gfx::Context& RendererBackend::getContext() {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <sstream>
#include <iomanip>
namespace mbgl {
namespace mln {
namespace gfx {
bool RenderingStats::isZero() const {
@@ -123,7 +123,7 @@ void RenderingStatsView::create(style::Style& style) {
return;
}
mbgl::FeatureCollection features;
mln::FeatureCollection features;
mapbox::geojson::feature feature;
feature.geometry = mapbox::geometry::geometry<double>(Point<double>{0, 0});
@@ -148,11 +148,11 @@ void RenderingStatsView::create(style::Style& style) {
infoLayer->setTextColor(options.textColor);
infoLayer->setTextSize(options.textSize);
infoLayer->setTextMaxWidth(300.0f);
infoLayer->setTextJustify(mbgl::style::TextJustifyType::Left);
infoLayer->setTextAnchor(mbgl::style::SymbolAnchorType::TopRight);
infoLayer->setTextJustify(mln::style::TextJustifyType::Left);
infoLayer->setTextAnchor(mln::style::SymbolAnchorType::TopRight);
const float translation = mbgl::util::EXTENT / 2.0f - 100.0f;
infoLayer->setTextTranslateAnchor(mbgl::style::TranslateAnchorType::Viewport);
const float translation = mln::util::EXTENT / 2.0f - 100.0f;
infoLayer->setTextTranslateAnchor(mln::style::TranslateAnchorType::Viewport);
infoLayer->setTextTranslate(std::array<float, 2>{translation, translation});
style.addLayer(std::move(infoLayer));
@@ -164,8 +164,8 @@ void RenderingStatsView::destroy(style::Style& style) {
style.removeSource(sourceID);
}
mbgl::style::SymbolLayer* RenderingStatsView::getLayer(style::Style& style) {
return static_cast<mbgl::style::SymbolLayer*>(style.getLayer(layerID));
mln::style::SymbolLayer* RenderingStatsView::getLayer(style::Style& style) {
return static_cast<mln::style::SymbolLayer*>(style.getLayer(layerID));
}
namespace {
@@ -279,7 +279,7 @@ void RenderingStatsView::update(style::Style& style, const gfx::RenderingStats&
printNumber(ss, "Stencil buffer clears", stats.stencilClears, true);
printNumber(ss, "Stencil buffer updates", stats.stencilUpdates, options.verbose);
layer->setTextField(mbgl::style::expression::Formatted(ss.str().c_str()));
layer->setTextField(mln::style::expression::Formatted(ss.str().c_str()));
frameCount = 0;
encodingTime = 0.0;
@@ -288,4 +288,4 @@ void RenderingStatsView::update(style::Style& style, const gfx::RenderingStats&
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -1,7 +1,7 @@
#include <mbgl/gfx/shader_group.hpp>
#include <mbgl/gfx/shader.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
bool ShaderGroup::isShader(const std::string& shaderName) const noexcept {
@@ -48,4 +48,4 @@ bool ShaderGroup::registerShader(std::shared_ptr<Shader>&& shader, const std::st
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -1,7 +1,7 @@
#include <mbgl/gfx/shader_registry.hpp>
#include <mbgl/gfx/shader_group.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
ShaderRegistry::ShaderRegistry()
@@ -47,4 +47,4 @@ bool ShaderRegistry::registerShaderGroup(ShaderGroupPtr&& shader, const std::str
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace style {
enum class SymbolType : uint8_t;
} // namespace style
@@ -44,4 +44,4 @@ struct SymbolDrawableData : public DrawableData {
using UniqueSymbolDrawableData = std::unique_ptr<SymbolDrawableData>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -29,7 +29,7 @@
} \
}
namespace mbgl {
namespace mln {
namespace gfx {
template <class>
@@ -46,4 +46,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/context.hpp>
namespace mbgl {
namespace mln {
namespace gfx {
std::shared_ptr<UniformBuffer> UniformBufferArray::nullref = nullptr;
@@ -53,4 +53,4 @@ void UniformBufferArray::createOrUpdate(
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -15,7 +15,7 @@
#include <string>
#include <vector>
namespace mbgl {
namespace mln {
namespace gfx {
class Conext;
@@ -99,4 +99,4 @@ public:
};
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <numeric>
#include <optional>
namespace mbgl {
namespace mln {
namespace gfx {
namespace {
@@ -129,4 +129,4 @@ void VertexAttributeArray::clear() {
}
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <vector>
namespace mbgl {
namespace mln {
namespace gfx {
struct VertexBufferBase {
@@ -128,4 +128,4 @@ template <typename T>
using VertexVectorPtr = std::shared_ptr<VertexVector<T>>;
} // namespace gfx
} // namespace mbgl
} // namespace mln

View File

@@ -1,7 +1,7 @@
#include <mbgl/gl/attribute.hpp>
#include <mbgl/gl/context.hpp>
namespace mbgl {
namespace mln {
namespace gl {
using namespace platform;
@@ -16,4 +16,4 @@ std::optional<AttributeLocation> queryLocation(ProgramID id, const char* name) {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -11,7 +11,7 @@
#include <type_traits>
#include <vector>
namespace mbgl {
namespace mln {
namespace gl {
using AttributeBindingArray = std::vector<std::optional<gfx::AttributeBinding>>;
@@ -130,4 +130,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <utility>
namespace mbgl {
namespace mln {
using namespace platform;
@@ -518,4 +518,4 @@ int32_t UniformBufferAllocator::getBufferID(size_t bufferIndex) const noexcept {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <cstring>
namespace mbgl {
namespace mln {
namespace gl {
CommandEncoder::~CommandEncoder() {
@@ -56,4 +56,4 @@ void CommandEncoder::popDebugGroup() {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

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

View File

@@ -29,7 +29,7 @@
#include <cstring>
#include <iterator>
namespace mbgl {
namespace mln {
namespace gl {
using namespace platform;
@@ -615,7 +615,7 @@ gfx::VertexAttributeArrayPtr Context::createVertexAttributeArray() const {
return std::make_shared<VertexAttributeArrayGL>();
}
void Context::clear(std::optional<mbgl::Color> color, std::optional<float> depth, std::optional<int32_t> stencil) {
void Context::clear(std::optional<mln::Color> color, std::optional<float> depth, std::optional<int32_t> stencil) {
MLN_TRACE_FUNC();
MLN_TRACE_FUNC_GL();
@@ -883,4 +883,4 @@ Texture2DPool& Context::getTexturePool() {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -25,7 +25,7 @@
#include <functional>
#include <vector>
namespace mbgl {
namespace mln {
namespace gl {
using ProcAddress = void (*)();
@@ -72,7 +72,7 @@ public:
return {size, readFramebuffer(size, format, flip)};
}
void clear(std::optional<mbgl::Color> color, std::optional<float> depth, std::optional<int32_t> stencil);
void clear(std::optional<mln::Color> color, std::optional<float> depth, std::optional<int32_t> stencil);
void setDepthMode(const gfx::DepthMode&);
void setStencilMode(const gfx::StencilMode&);
@@ -255,4 +255,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -1,7 +1,7 @@
#include <mbgl/gl/debugging_extension.hpp>
#include <mbgl/util/logging.hpp>
namespace mbgl {
namespace mln {
namespace gl {
namespace extension {
@@ -73,34 +73,34 @@ void Debugging::DebugCallback(GLenum source,
}
std::string strSeverity;
mbgl::EventSeverity evtSeverity;
mln::EventSeverity evtSeverity;
switch (severity) {
case GL_DEBUG_SEVERITY_HIGH:
strSeverity = "DEBUG_SEVERITY_HIGH";
evtSeverity = mbgl::EventSeverity::Error;
evtSeverity = mln::EventSeverity::Error;
break;
case GL_DEBUG_SEVERITY_MEDIUM:
strSeverity = "DEBUG_SEVERITY_MEDIUM";
evtSeverity = mbgl::EventSeverity::Warning;
evtSeverity = mln::EventSeverity::Warning;
break;
case GL_DEBUG_SEVERITY_LOW:
strSeverity = "DEBUG_SEVERITY_LOW";
evtSeverity = mbgl::EventSeverity::Info;
evtSeverity = mln::EventSeverity::Info;
break;
case GL_DEBUG_SEVERITY_NOTIFICATION:
strSeverity = "DEBUG_SEVERITY_NOTIFICATION";
evtSeverity = mbgl::EventSeverity::Debug;
evtSeverity = mln::EventSeverity::Debug;
break;
default:
strSource = "(unknown)";
evtSeverity = mbgl::EventSeverity::Debug;
evtSeverity = mln::EventSeverity::Debug;
break;
}
const std::string logMsg = "GL_" + strSource + " GL_" + strType + " " + std::to_string(id) + " GL_" + strSeverity +
" - " + message;
mbgl::Log::Record(evtSeverity, mbgl::Event::OpenGL, logMsg);
mln::Log::Record(evtSeverity, mln::Event::OpenGL, logMsg);
}
} // namespace extension
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -48,7 +48,7 @@
#define GL_RENDERBUFFER 0x8D41
#define GL_FRAMEBUFFER 0x8D40
namespace mbgl {
namespace mln {
namespace gl {
namespace extension {
@@ -107,4 +107,4 @@ public:
} // namespace extension
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/draw_scope.hpp>
#include <mbgl/gl/vertex_array.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class DrawScopeResource : public gfx::DrawScopeResource {
@@ -15,4 +15,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <mbgl/util/instrumentation.hpp>
#include <mbgl/util/logging.hpp>
namespace mbgl {
namespace mln {
namespace gl {
DrawableGL::DrawableGL(std::string name_)
@@ -37,7 +37,7 @@ void DrawableGL::draw(PaintParameters& parameters) const {
}
}
if (!shader || context.program.getCurrentValue() == 0) {
mbgl::Log::Warning(Event::General, "Missing shader for drawable " + util::toString(getID()) + "/" + getName());
mln::Log::Warning(Event::General, "Missing shader for drawable " + util::toString(getID()) + "/" + getName());
assert(false);
return;
}
@@ -138,7 +138,7 @@ struct IndexBufferGL : public gfx::IndexBufferBase {
: buffer(std::move(buffer_)) {}
~IndexBufferGL() override = default;
std::unique_ptr<mbgl::gfx::IndexBuffer> buffer;
std::unique_ptr<mln::gfx::IndexBuffer> buffer;
};
void DrawableGL::upload(gfx::UploadPass& uploadPass) {
@@ -281,4 +281,4 @@ void DrawableGL::unbindTextures() const {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <cstring>
namespace mbgl {
namespace mln {
namespace gl {
gfx::UniqueDrawable DrawableGLBuilder::createDrawable() const {
@@ -47,4 +47,4 @@ void DrawableGLBuilder::init() {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -16,7 +16,7 @@
#include <memory>
#include <vector>
namespace mbgl {
namespace mln {
namespace gl {
using namespace platform;
@@ -64,4 +64,4 @@ protected:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gl/texture2d.hpp>
#include <mbgl/gl/context.hpp>
namespace mbgl {
namespace mln {
namespace gl {
DynamicTexture::DynamicTexture(Context& context, Size size, gfx::TexturePixelType pixelType)
@@ -46,4 +46,4 @@ bool DynamicTexture::removeTexture(const gfx::TextureHandle& texHandle) {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gfx/types.hpp>
#include <mbgl/gl/defines.hpp>
namespace mbgl {
namespace mln {
namespace gl {
template <>
@@ -477,4 +477,4 @@ platform::GLenum Enum<gfx::RenderbufferPixelType>::to(const gfx::RenderbufferPix
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <type_traits>
namespace mbgl {
namespace mln {
namespace gl {
template <typename T>
@@ -23,4 +23,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <utility>
#include <functional>
namespace mbgl {
namespace mln {
namespace gl {
using ProcAddress = void (*)();
@@ -27,4 +27,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <stdexcept>
#include <string>
namespace mbgl {
namespace mln {
namespace gl {
using namespace platform;
@@ -66,4 +66,4 @@ bool Fence::isSignaled() const {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gl/types.hpp>
#include <mbgl/platform/gl_functions.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class Fence {
@@ -19,4 +19,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gl/object.hpp>
#include <mbgl/util/size.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class Framebuffer {
@@ -13,4 +13,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <mbgl/gl/index_buffer_resource.hpp>
#include <mbgl/util/instrumentation.hpp>
namespace mbgl {
namespace mln {
namespace gl {
IndexBufferResource::IndexBufferResource(UniqueBuffer&& buffer_, int byteSize_)
@@ -35,4 +35,4 @@ IndexBufferResource::~IndexBufferResource() noexcept {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/index_buffer.hpp>
#include <mbgl/gl/object.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class IndexBufferResource : public gfx::IndexBufferResource {
@@ -16,4 +16,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -11,7 +11,7 @@
#include <mbgl/util/convert.hpp>
#include <mbgl/util/instrumentation.hpp>
namespace mbgl {
namespace mln {
namespace gl {
using namespace platform;
@@ -208,4 +208,4 @@ void LayerGroupGL::render(RenderOrchestrator&, PaintParameters& parameters) {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <cassert>
namespace mbgl {
namespace mln {
namespace gl {
namespace detail {
@@ -48,4 +48,4 @@ void RenderbufferDeleter::operator()(RenderbufferID id) const {
} // namespace detail
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <unique_resource.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class Context;
@@ -57,4 +57,4 @@ using UniqueFramebuffer = std_experimental::unique_resource<FramebufferID, detai
using UniqueRenderbuffer = std_experimental::unique_resource<RenderbufferID, detail::RenderbufferDeleter>;
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gl/context.hpp>
#include <mbgl/gl/framebuffer.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class OffscreenTextureResource final : public gl::RenderableResource {
@@ -77,4 +77,4 @@ const gfx::Texture2DPtr& OffscreenTexture::getTexture() {
}
} // namespace gl
} // 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 gl {
class Context;
@@ -21,4 +21,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gl/renderable_resource.hpp>
#include <mbgl/gl/context.hpp>
namespace mbgl {
namespace mln {
namespace gl {
RenderPass::RenderPass(gl::CommandEncoder& commandEncoder_,
@@ -26,4 +26,4 @@ void RenderPass::popDebugGroup() {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

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

View File

@@ -2,7 +2,7 @@
#include <mbgl/gl/renderbuffer_resource.hpp>
#include <mbgl/util/instrumentation.hpp>
namespace mbgl {
namespace mln {
namespace gl {
RenderbufferResource::~RenderbufferResource() noexcept {
@@ -10,4 +10,4 @@ RenderbufferResource::~RenderbufferResource() noexcept {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <mbgl/gfx/renderbuffer.hpp>
#include <mbgl/gl/object.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class RenderbufferResource final : public gfx::RenderbufferResource {
@@ -17,4 +17,4 @@ public:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
#include <cassert>
namespace mbgl {
namespace mln {
namespace gl {
RendererBackend::RendererBackend(const gfx::ContextMode contextMode_)
@@ -155,4 +155,4 @@ void RendererBackend::initShaders(gfx::ShaderRegistry& shaders, const ProgramPar
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <mbgl/util/instrumentation.hpp>
#include <mbgl/util/logging.hpp>
namespace mbgl {
namespace mln {
namespace gl {
using namespace platform;
@@ -283,4 +283,4 @@ size_t Texture2DPool::storage(TextureID id) const {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <mbgl/util/lru_cache.hpp>
#include <mbgl/util/size.hpp>
namespace mbgl {
namespace mln {
namespace gl {
class Context;
@@ -119,4 +119,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <tuple>
namespace mbgl {
namespace mln {
namespace gl {
// Wraps a piece of OpenGL state and remember its value to avoid redundant state
@@ -59,4 +59,4 @@ private:
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <mbgl/platform/gl_functions.hpp>
#include <mbgl/util/instrumentation.hpp>
namespace mbgl {
namespace mln {
namespace gl {
Texture2D::Texture2D(gl::Context& context_)
@@ -31,7 +31,7 @@ Texture2D& Texture2D::setFormat(gfx::TexturePixelType pixelFormat_, gfx::Texture
return *this;
}
Texture2D& Texture2D::setSize(mbgl::Size size_) noexcept {
Texture2D& Texture2D::setSize(mln::Size size_) noexcept {
size = size_;
storageDirty = true;
return *this;
@@ -203,4 +203,4 @@ void Texture2D::upload() {
}
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <cassert>
#include <memory>
namespace mbgl {
namespace mln {
namespace gl {
namespace extension {
@@ -119,4 +119,4 @@ void loadTimeStampQueryExtension(const GlContexsLoader &loadExtension) {
} // namespace extension
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -13,7 +13,7 @@
#define GL_TIMESTAMP 0x8E28
#define GL_GPU_DISJOINT 0x8FBB
namespace mbgl {
namespace mln {
namespace gl {
namespace extension {
@@ -38,4 +38,4 @@ void loadTimeStampQueryExtension(const GlContexsLoader &loadExtension);
} // namespace extension
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <cstdint>
#include <type_traits>
namespace mbgl {
namespace mln {
namespace gl {
// Mapping based on https://www.opengl.org/wiki/OpenGL_Type
@@ -59,4 +59,4 @@ enum class UniformDataType : uint32_t {
};
} // namespace gl
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <memory>
namespace mbgl {
namespace mln {
namespace gl {
using namespace platform;
@@ -200,4 +200,4 @@ bool verifyUniform<std::array<uint16_t, 4>>(const ActiveUniform& uniform) {
#endif
} // namespace gl
} // namespace mbgl
} // namespace mln

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