@@ -111,7 +111,7 @@ void generateFillBuffers(const GeometryCollection& geometry,
|
||||
gfx::IndexVector<Triangles>& fillIndexes,
|
||||
SegmentVector& fillSegments) {
|
||||
for (auto& polygon : classifyRings(geometry)) {
|
||||
// Optimize polygons with many interior rings for earcut tesselation.
|
||||
// Optimize polygons with many interior rings for earcut tessellation.
|
||||
limitHoles(polygon, 500);
|
||||
|
||||
std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||
@@ -133,7 +133,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
|
||||
gfx::IndexVector<gfx::Lines>& lineIndexes,
|
||||
SegmentVector& lineSegments) {
|
||||
for (auto& polygon : classifyRings(geometry)) {
|
||||
// Optimize polygons with many interior rings for earcut tesselation.
|
||||
// Optimize polygons with many interior rings for earcut tessellation.
|
||||
limitHoles(polygon, 500);
|
||||
|
||||
std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||
@@ -171,7 +171,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
|
||||
lineOptions.type = FeatureType::Polygon;
|
||||
|
||||
for (auto& polygon : classifyRings(geometry)) {
|
||||
// Optimize polygons with many interior rings for earcut tesselation.
|
||||
// Optimize polygons with many interior rings for earcut tessellation.
|
||||
limitHoles(polygon, 500);
|
||||
|
||||
std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||
@@ -223,7 +223,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
|
||||
}
|
||||
|
||||
for (auto& polygon : classifyRings(geometry)) {
|
||||
// Optimize polygons with many interior rings for earcut tesselation.
|
||||
// Optimize polygons with many interior rings for earcut tessellation.
|
||||
limitHoles(polygon, 500);
|
||||
|
||||
const std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||
|
||||
@@ -338,7 +338,7 @@ void PolylineGenerator<PLV, PS>::generate(const GeometryCoordinates& coordinates
|
||||
offsetB = offset;
|
||||
}
|
||||
|
||||
// Close previous segement with bevel
|
||||
// Close previous segment with bevel
|
||||
if (!startOfLine) {
|
||||
addCurrentVertex(*currentCoordinate,
|
||||
distance,
|
||||
|
||||
@@ -649,7 +649,7 @@ void Context::setCullFaceMode(const gfx::CullFaceMode& mode) {
|
||||
cullFace = mode.enabled;
|
||||
|
||||
// These shouldn't need to be updated when face culling is disabled, but we
|
||||
// might end up having the same isssues with Adreno 2xx GPUs as noted in
|
||||
// might end up having the same issues with Adreno 2xx GPUs as noted in
|
||||
// Context::setDepthMode.
|
||||
cullFaceSide = mode.side;
|
||||
cullFaceWinding = mode.winding;
|
||||
|
||||
@@ -103,7 +103,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr
|
||||
/// in the parameter pack and register it with the shader registry.
|
||||
|
||||
/// Registration calls are wrapped in a lambda that throws on registration
|
||||
/// failure, we shouldn't expect registration to faill unless the shader
|
||||
/// failure, we shouldn't expect registration to fail unless the shader
|
||||
/// registry instance provided already has conflicting programs present.
|
||||
(
|
||||
[&]() {
|
||||
|
||||
@@ -162,7 +162,7 @@ void TransformState::getProjMatrix(mat4& projMatrix, uint16_t nearZ, bool aligne
|
||||
|
||||
// Move the center of perspective to center of specified edgeInsets.
|
||||
// Values are in range [-1, 1] where the upper and lower range values
|
||||
// position viewport center to the screen edges. This is overriden
|
||||
// position viewport center to the screen edges. This is overridden
|
||||
// if using axonometric perspective (not in public API yet, Issue #11882).
|
||||
// TODO(astojilj): Issue #11882 should take edge insets into account, too.
|
||||
if (!axonometric) {
|
||||
|
||||
@@ -283,7 +283,7 @@ const BufferResource& Context::getTileIndexBuffer() {
|
||||
|
||||
const UniqueVertexBufferResource& Context::getEmptyVertexBuffer() {
|
||||
if (!emptyVertexBuffer) {
|
||||
// This buffer is bound to vertex attribtue indexes when the uniforms are used instead and
|
||||
// This buffer is bound to vertex attribute indexes when the uniforms are used instead and
|
||||
// shaders are expected not to access the attribute values, but Metal requires a binding.
|
||||
// This buffer could also hold a single default value applied for all vertices, in which case
|
||||
// it could not be shared (See `MTL::VertexStepFunctionConstant` in the vertex attribute
|
||||
|
||||
@@ -86,7 +86,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr
|
||||
/// in the parameter pack and register it with the shader registry.
|
||||
|
||||
/// Registration calls are wrapped in a lambda that throws on registration
|
||||
/// failure, we shouldn't expect registration to faill unless the shader
|
||||
/// failure, we shouldn't expect registration to fail unless the shader
|
||||
/// registry instance provided already has conflicting programs present.
|
||||
(
|
||||
[&]() {
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace mbgl {
|
||||
namespace plugins {
|
||||
|
||||
// This is really hacky, but wanted to do it here to discuss if the
|
||||
// const can be removed from teh regular LayerTypeInfo
|
||||
// const can be removed from the regular LayerTypeInfo
|
||||
struct NonConstLayerTypeInfo {
|
||||
const char* type;
|
||||
enum class Source {
|
||||
|
||||
@@ -29,7 +29,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr
|
||||
/// in the parameter pack and register it with the shader registry.
|
||||
|
||||
/// Registration calls are wrapped in a lambda that throws on registration
|
||||
/// failure, we shouldn't expect registration to faill unless the shader
|
||||
/// failure, we shouldn't expect registration to fail unless the shader
|
||||
/// registry instance provided already has conflicting programs present.
|
||||
(
|
||||
[](bool expr) {
|
||||
|
||||
@@ -63,7 +63,7 @@ void FillExtrusionBucket::addFeature(const GeometryTileFeature& feature,
|
||||
std::size_t index,
|
||||
const CanonicalTileID& canonical) {
|
||||
for (auto& polygon : classifyRings(geometry)) {
|
||||
// Optimize polygons with many interior rings for earcut tesselation.
|
||||
// Optimize polygons with many interior rings for earcut tessellation.
|
||||
limitHoles(polygon, 500);
|
||||
|
||||
std::size_t totalVertices = 0;
|
||||
|
||||
@@ -134,7 +134,7 @@ std::array<float, N * 2> zoomInterpolatedAttributeValue(const std::array<float,
|
||||
|
||||
Note that the shader source varies depending on whether we're using a uniform
|
||||
or attribute. Like GL JS, we dynamically compile shaders at runtime to
|
||||
accomodate this.
|
||||
accommodate this.
|
||||
*/
|
||||
|
||||
template <class T, class UniformValueType, class PossiblyEvaluatedType, class... As>
|
||||
@@ -522,7 +522,7 @@ public:
|
||||
const CanonicalTileID&,
|
||||
const style::expression::Value&) override {
|
||||
if (!patternDependencies || patternDependencies->mid.empty()) {
|
||||
// Unlike other propperties with expressions that evaluate to null,
|
||||
// Unlike other properties with expressions that evaluate to null,
|
||||
// the default value for `*-pattern` properties is an empty string
|
||||
// and will not have a valid entry in patternPositions. We still
|
||||
// need to populate the attribute buffers to avoid crashes when we
|
||||
|
||||
@@ -295,7 +295,7 @@ protected:
|
||||
|
||||
LayerPlacementData placementData;
|
||||
|
||||
// will need to be overriden to handle their activation.
|
||||
// will need to be overridden to handle their activation.
|
||||
LayerGroupBasePtr layerGroup;
|
||||
|
||||
// An optional tweaker that will update drawables
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <Metal/MTLCaptureManager.hpp>
|
||||
#include <Metal/MTLCaptureScope.hpp>
|
||||
/// Enable programmatic Metal frame captures for specific frame numbers.
|
||||
/// Requries iOS 13
|
||||
/// Requires iOS 13
|
||||
constexpr auto EnableMetalCapture = 0;
|
||||
constexpr auto CaptureFrameStart = 0; // frames are 0-based
|
||||
constexpr auto CaptureFrameCount = 1;
|
||||
|
||||
@@ -132,7 +132,7 @@ void RenderImageSource::update(Immutable<style::Source::Impl> baseImpl_,
|
||||
tileIds.push_back(tileCover[0]);
|
||||
|
||||
bool hasVisibleTile = false;
|
||||
// Add additional wrapped tile ids if neccessary
|
||||
// Add additional wrapped tile ids if necessary
|
||||
Range<uint8_t> zoomRange(0, zoom);
|
||||
auto idealTiles = util::tileCover({.transformState = transformState,
|
||||
.tileLodMinRadius = parameters.tileLodMinRadius,
|
||||
|
||||
@@ -20,7 +20,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr
|
||||
/// in the parameter pack and register it with the shader registry.
|
||||
|
||||
/// Registration calls are wrapped in a lambda that throws on registration
|
||||
/// failure, we shouldn't expect registration to faill unless the shader
|
||||
/// failure, we shouldn't expect registration to fail unless the shader
|
||||
/// registry instance provided already has conflicting programs present.
|
||||
(
|
||||
[](bool expr) {
|
||||
|
||||
@@ -878,7 +878,7 @@ using namespace mbgl::style::conversion;
|
||||
EvaluationResult Distance::evaluate(const EvaluationContext& params) const {
|
||||
if (!params.feature || !params.canonical) {
|
||||
return EvaluationError{
|
||||
"distance expression requirs valid feature and canonical "
|
||||
"distance expression requires valid feature and canonical "
|
||||
"information."};
|
||||
}
|
||||
auto geometryType = params.feature->getType();
|
||||
|
||||
@@ -112,7 +112,7 @@ std::optional<Formatted> Converter<Formatted>::operator()(const Convertible& val
|
||||
std::optional<std::string> imageArg = toString(arrayMember(firstElement, 1));
|
||||
if (!imageArg) {
|
||||
error.message =
|
||||
"Serialized image section agument has to be of a "
|
||||
"Serialized image section argument has to be of a "
|
||||
"String type.";
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ layerCapabilities['heatmap'] = defaults.require('Source')
|
||||
layerCapabilities['raster'] = defaults.require('Source').set('TileKind', 'Raster').finalize();
|
||||
layerCapabilities['location-indicator'] = defaults.finalize();
|
||||
|
||||
// Splits lines that are over 120 characters at the firts occurance of '='.
|
||||
// Splits lines that are over 120 characters at the first occurrence of '='.
|
||||
const split120Line = line => {
|
||||
const ident = ' ';
|
||||
if (line.length + ident.length > 120) {
|
||||
|
||||
@@ -17,7 +17,7 @@ std::u16string applyArabicShaping(const std::u16string&);
|
||||
|
||||
// StyledText pairs each code point in a string with an integer indicating
|
||||
// the styling options to use for rendering that code point
|
||||
// The data structure is intended to accomodate the reordering/interleaving
|
||||
// The data structure is intended to accommodate the reordering/interleaving
|
||||
// of formatting that can happen when BiDi rearranges inputs
|
||||
using StyledText = std::pair<std::u16string, std::vector<uint8_t>>;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ float CollisionIndex::approximateTileDistance(const TileDistance& tileDistance,
|
||||
const float pixelsToTileUnits,
|
||||
const float cameraToAnchorDistance,
|
||||
const bool pitchWithMap) {
|
||||
// This is a quick and dirty solution for chosing which collision circles to
|
||||
// This is a quick and dirty solution for choosing which collision circles to
|
||||
// use (since collision circles are laid out in tile units). Ideally, I
|
||||
// think we should generate collision circles on the fly in viewport
|
||||
// coordinates at the time we do collision detection.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
MapLibre Style Spec specifies locales with BCP 47
|
||||
Android and Intl.Collator implementations speak BCP 47 out of the box
|
||||
Darwin implementation requires translation to "Language Identifier"
|
||||
We're OK with not supporting extensions, but we want to succesfully
|
||||
We're OK with not supporting extensions, but we want to successfully
|
||||
parse any valid BCP 47 tag and get out the base language/script/region.
|
||||
|
||||
Mozilla's version:
|
||||
|
||||
@@ -222,7 +222,7 @@ SymbolQuads getGlyphQuads(const Shaping& shapedText,
|
||||
for (const auto& positionedGlyph : line.positionedGlyphs) {
|
||||
if (!positionedGlyph.rect.hasArea()) continue;
|
||||
|
||||
// The rects have an addditional buffer that is not included in their size;
|
||||
// The rects have an additional buffer that is not included in their size;
|
||||
const float glyphPadding = 1.0f;
|
||||
float rectBuffer = 3.0f + glyphPadding;
|
||||
float pixelRatio = 1.0f;
|
||||
|
||||
@@ -371,7 +371,7 @@ std::set<std::size_t> determineLineBreaks(const TaggedString& logicalInput,
|
||||
|
||||
std::list<PotentialBreak> potentialBreaks;
|
||||
float currentX = 0;
|
||||
// Find first occurance of zero width space (ZWSP) character.
|
||||
// Find first occurrence of zero width space (ZWSP) character.
|
||||
const bool hasServerSuggestedBreaks = logicalInput.rawText().find_first_of(ZWSP) != std::string::npos;
|
||||
|
||||
for (std::size_t i = 0; i < logicalInput.length(); i++) {
|
||||
|
||||
@@ -539,7 +539,7 @@ void GeometryTile::querySourceFeatures(std::vector<Feature>& result, const Sourc
|
||||
}
|
||||
|
||||
for (const auto& sourceLayer : *options.sourceLayers) {
|
||||
// Go throught all sourceLayers, if any
|
||||
// Go through all sourceLayers, if any
|
||||
// to gather all the features
|
||||
auto layer = getData()->getLayer(sourceLayer);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ std::string rfc1123(Timestamp timestamp) {
|
||||
// Buffer size 30 is OK assuming the year has 4 digits. However, In theory,
|
||||
// it might have more digits. Under gcc 8.3.0 with -Os optimization flag,
|
||||
// there is compiler warning complaining about the buffer size might be too
|
||||
// small. Inceasing the buffer to 32 fixes the warning.
|
||||
// small. Increasing the buffer to 32 fixes the warning.
|
||||
char buffer[32];
|
||||
snprintf(buffer,
|
||||
32,
|
||||
|
||||
@@ -75,7 +75,7 @@ std::map<std::string, std::string> createTokenMap(const std::string& urlTemplate
|
||||
|
||||
// --- extract token values
|
||||
// /tiles{path}/tiles.json in tiles/satellite/tiles.json
|
||||
// e.g. path = /satelite
|
||||
// e.g. path = /satellite
|
||||
std::regex tokenPattern(R"(\{domain\}|\{path\}|\{directory\}|\{filename\}|\{extension\})");
|
||||
std::string templatePattern = std::regex_replace(
|
||||
urlTemplate, tokenPattern, "(.+)", std::regex_constants::match_any);
|
||||
|
||||
@@ -290,7 +290,7 @@ TileCover::Impl::Impl(int32_t z, const Geometry<double>& geom, bool project)
|
||||
boundsMap = apply_visitor(toBoundsMap, geom);
|
||||
if (boundsMap.empty()) return;
|
||||
|
||||
// Iniitalize the active edge table, and current row span
|
||||
// Initialize the active edge table, and current row span
|
||||
currentBounds = boundsMap.begin();
|
||||
tileY = 0;
|
||||
nextRow();
|
||||
|
||||
@@ -60,7 +60,7 @@ struct Bound {
|
||||
};
|
||||
|
||||
// Implements a modified scan-line algorithm to provide a streaming interface
|
||||
// for tile cover on arbitrary shapes. A `BoundsMap` is genereted from the input
|
||||
// for tile cover on arbitrary shapes. A `BoundsMap` is generated from the input
|
||||
// geometry where each tuple indicates the set of Bounds that start at a y tile
|
||||
// coordinate. Each bound represents a chain of edges from a local y-minima to a
|
||||
// local y-maxima. For each row, the activeBounds list aggregates all bounds
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace util {
|
||||
std::string percentEncode(const std::string&);
|
||||
std::string percentDecode(const std::string&);
|
||||
|
||||
// Class that holds position + lenth pairs for scheme, domain, path + query string of a URL.
|
||||
// Class that holds position + length pairs for scheme, domain, path + query string of a URL.
|
||||
class URL {
|
||||
public:
|
||||
using Segment = std::pair<size_t, size_t>; // position, length
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
URL(const std::string&);
|
||||
};
|
||||
|
||||
// Class that holds position + lenth pairs for directory, extension, and
|
||||
// Class that holds position + length pairs for directory, extension, and
|
||||
// filename of a path. The extension will contain the preceding ., and
|
||||
// optionally a preceding @2x specifier. The filename will not contain the file
|
||||
// extension.
|
||||
|
||||
@@ -675,7 +675,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr
|
||||
/// in the parameter pack and register it with the shader registry.
|
||||
|
||||
// Registration calls are wrapped in a lambda that throws on registration
|
||||
// failure, we shouldn't expect registration to faill unless the shader
|
||||
// failure, we shouldn't expect registration to fail unless the shader
|
||||
// registry instance provided already has conflicting programs present.
|
||||
(
|
||||
[&]() {
|
||||
|
||||
Reference in New Issue
Block a user