16
CHANGELOG.md
16
CHANGELOG.md
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
Default minimum tile update interval value is `Duration::zero()`.
|
Default minimum tile update interval value is `Duration::zero()`.
|
||||||
|
|
||||||
- [core] Indroduce `distance` expression. ([#16397](https://github.com/mapbox/mapbox-gl-native/pull/16397))
|
- [core] Introduce `distance` expression. ([#16397](https://github.com/mapbox/mapbox-gl-native/pull/16397))
|
||||||
|
|
||||||
The `distance` expression returns the shortest distance between two geometries. The returned value can be consumed as an input into another expression for changing a paint or layout property or filtering features by distance.
|
The `distance` expression returns the shortest distance between two geometries. The returned value can be consumed as an input into another expression for changing a paint or layout property or filtering features by distance.
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
|
|
||||||
- [core] Add Renderer::clearData() ([#16323](https://github.com/mapbox/mapbox-gl-native/pull/16323))
|
- [core] Add Renderer::clearData() ([#16323](https://github.com/mapbox/mapbox-gl-native/pull/16323))
|
||||||
|
|
||||||
The newly added `Renderer::clearData()` method allows to clear render data and thus save memory and make sure outdated tiles are not shown. It clears data more agressively than `Renderer::reduceMemoryUse()` does, as it clears not only the cache but all orchestration data, including the data used by the currently rendered frame.
|
The newly added `Renderer::clearData()` method allows to clear render data and thus save memory and make sure outdated tiles are not shown. It clears data more aggressively than `Renderer::reduceMemoryUse()` does, as it clears not only the cache but all orchestration data, including the data used by the currently rendered frame.
|
||||||
|
|
||||||
- [android] Add jni binding for styleable snapshotter ([#16286](https://github.com/mapbox/mapbox-gl-native/pull/16286))
|
- [android] Add jni binding for styleable snapshotter ([#16286](https://github.com/mapbox/mapbox-gl-native/pull/16286))
|
||||||
|
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
- [android] Update toGeoJSON in android_conversion.hpp ([#16243](https://github.com/mapbox/mapbox-gl-native/pull/16243))
|
- [android] Update toGeoJSON in android_conversion.hpp ([#16243](https://github.com/mapbox/mapbox-gl-native/pull/16243))
|
||||||
|
|
||||||
Before this chage, `toGeoJSON` method in `android_conversion.hpp` could not convert an Object (Map in android) to GeoJSON object.
|
Before this change, `toGeoJSON` method in `android_conversion.hpp` could not convert an Object (Map in android) to GeoJSON object.
|
||||||
|
|
||||||
But `within` expression needs to accept an Object and then convert it to the GeoJSON object, now `toGeoJSON` method can convert both string and Object to GeoJSON.
|
But `within` expression needs to accept an Object and then convert it to the GeoJSON object, now `toGeoJSON` method can convert both string and Object to GeoJSON.
|
||||||
|
|
||||||
@@ -291,7 +291,7 @@
|
|||||||
|
|
||||||
- [offline] Offline tool does not hang on 404 error ([#16240](https://github.com/mapbox/mapbox-gl-native/pull/16240))
|
- [offline] Offline tool does not hang on 404 error ([#16240](https://github.com/mapbox/mapbox-gl-native/pull/16240))
|
||||||
|
|
||||||
The missing resource gets skipped and teh offline region download continues.
|
The missing resource gets skipped and the offline region download continues.
|
||||||
|
|
||||||
##### ⚠️ Breaking changes
|
##### ⚠️ Breaking changes
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@
|
|||||||
Breaking code example:
|
Breaking code example:
|
||||||
`auto fs = FileSourceManager::getFileSource(); fs->..`
|
`auto fs = FileSourceManager::getFileSource(); fs->..`
|
||||||
|
|
||||||
Posible fix:
|
Possible fix:
|
||||||
`std::shared_ptr<FileSource> fs = `;
|
`std::shared_ptr<FileSource> fs = `;
|
||||||
|
|
||||||
- The `mbgl::OnlineFileSource` class cannot be used directly ([#16238](https://github.com/mapbox/mapbox-gl-native/pull/16238))
|
- The `mbgl::OnlineFileSource` class cannot be used directly ([#16238](https://github.com/mapbox/mapbox-gl-native/pull/16238))
|
||||||
@@ -343,7 +343,7 @@
|
|||||||
|
|
||||||
The new `Source::setPrefetchZoomDelta(optional<uint8_t>)` method allows overriding default tile prefetch setting that is defined by the Map instance.
|
The new `Source::setPrefetchZoomDelta(optional<uint8_t>)` method allows overriding default tile prefetch setting that is defined by the Map instance.
|
||||||
|
|
||||||
- [core] Add support for `within expression`. Implement the use of `within expression` with paint propery and filter expression. ([#16157](https://github.com/mapbox/mapbox-gl-native/pull/16157))
|
- [core] Add support for `within expression`. Implement the use of `within expression` with paint property and filter expression. ([#16157](https://github.com/mapbox/mapbox-gl-native/pull/16157))
|
||||||
|
|
||||||
The `within expression` enables checking whether a feature is inside a pre-defined geometry set/boundary or not. This `within expression` returns a boolean value, `true` indicates that the feature being evaluated is inside the geometry set. The returned value can be then consumed as input by another expression or used directly by a paint/layer property.
|
The `within expression` enables checking whether a feature is inside a pre-defined geometry set/boundary or not. This `within expression` returns a boolean value, `true` indicates that the feature being evaluated is inside the geometry set. The returned value can be then consumed as input by another expression or used directly by a paint/layer property.
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@
|
|||||||
|
|
||||||
- [core] Don't provide multiple responses with the same data for 304 replies ([#16200](https://github.com/mapbox/mapbox-gl-native/pull/16200))
|
- [core] Don't provide multiple responses with the same data for 304 replies ([#16200](https://github.com/mapbox/mapbox-gl-native/pull/16200))
|
||||||
|
|
||||||
In cases when cached resource is useable, yet don't have an expiration timestamp, we provided data to the requester from the cache and the same data was returned once 304 response was received from the network.
|
In cases when cached resource is usable, yet don't have an expiration timestamp, we provided data to the requester from the cache and the same data was returned once 304 response was received from the network.
|
||||||
|
|
||||||
- [core] Fix potential visual artifact for line-dasharray ([#16202](https://github.com/mapbox/mapbox-gl-native/pull/16202))
|
- [core] Fix potential visual artifact for line-dasharray ([#16202](https://github.com/mapbox/mapbox-gl-native/pull/16202))
|
||||||
|
|
||||||
@@ -470,7 +470,7 @@
|
|||||||
|
|
||||||
- [core] Retain thread pool in GeoJSONSource ([#15992](https://github.com/mapbox/mapbox-gl-native/pull/15992))
|
- [core] Retain thread pool in GeoJSONSource ([#15992](https://github.com/mapbox/mapbox-gl-native/pull/15992))
|
||||||
|
|
||||||
Otherwise, the construction of the `Immutable<Source::Impl>` in background thread might never yeld.
|
Otherwise, the construction of the `Immutable<Source::Impl>` in background thread might never yield.
|
||||||
|
|
||||||
- [core] Fix supercluster lambdas capturing ([#15989](https://github.com/mapbox/mapbox-gl-native/pull/15989))
|
- [core] Fix supercluster lambdas capturing ([#15989](https://github.com/mapbox/mapbox-gl-native/pull/15989))
|
||||||
|
|
||||||
|
|||||||
@@ -1246,7 +1246,7 @@ if(MLN_WITH_METAL AND MLN_CREATE_AUTORELEASEPOOL)
|
|||||||
# in memory leaks when autoreleased objects are created.
|
# in memory leaks when autoreleased objects are created.
|
||||||
|
|
||||||
# Platforms such as iOS and GLFW use ARC with @autoreleasepool blocks, for these platforms
|
# Platforms such as iOS and GLFW use ARC with @autoreleasepool blocks, for these platforms
|
||||||
# creating an AutoreleasePool is not neccesary (and in fact will not work).
|
# creating an AutoreleasePool is not necessary (and in fact will not work).
|
||||||
# When using MapLibre Native with Metal on other platforms such as Node.js, you can pass
|
# When using MapLibre Native with Metal on other platforms such as Node.js, you can pass
|
||||||
# this variable to ensure an AutoReleasePool is created in the render loop.
|
# this variable to ensure an AutoReleasePool is created in the render loop.
|
||||||
# See also:
|
# See also:
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ There is an [npm package](https://www.npmjs.com/package/@maplibre/maplibre-gl-na
|
|||||||
|
|
||||||
## Qt
|
## Qt
|
||||||
|
|
||||||
Please check out the [`maplibre/maplibre-native-qt` repository](https://github.com/maplibre/maplibre-native-qt) to learn how to intergrate MapLibre Native with a Qt project.
|
Please check out the [`maplibre/maplibre-native-qt` repository](https://github.com/maplibre/maplibre-native-qt) to learn how to integrate MapLibre Native with a Qt project.
|
||||||
|
|
||||||
## Compose Multiplatform
|
## Compose Multiplatform
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ The argument for Kotlin over Java is typically along the lines of Kotlin being a
|
|||||||
|
|
||||||
Kotlin seems like a natural successor language to java, because it brings some advantages with no real downsides. It has full interoperability allowing us to port files 1-1.
|
Kotlin seems like a natural successor language to java, because it brings some advantages with no real downsides. It has full interoperability allowing us to port files 1-1.
|
||||||
|
|
||||||
There are also intersting features being added to the language that we can explore in the future if we decide to invest in kotlin competence now - such as [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html#full-stack-web-applications) for cross-platform compilation.
|
There are also interesting features being added to the language that we can explore in the future if we decide to invest in kotlin competence now - such as [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html#full-stack-web-applications) for cross-platform compilation.
|
||||||
|
|
||||||
## Proposed Change
|
## Proposed Change
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ If you thought real time rendering was mostly about triangles, I have some bad n
|
|||||||
|
|
||||||
The boring way is to allocate Buffers and stick your geometry, indices, textures, uniforms, car keys, manifesto, and texture coordinates in them. They're just memory. You ask for how much you want, you get a handle, you copy what you need into place. You fix whatever buffer overruns you created.
|
The boring way is to allocate Buffers and stick your geometry, indices, textures, uniforms, car keys, manifesto, and texture coordinates in them. They're just memory. You ask for how much you want, you get a handle, you copy what you need into place. You fix whatever buffer overruns you created.
|
||||||
|
|
||||||
Metal isn't fussy about a buffer containing vertices vs. indices vs. uniforms. Mostly. So you build a little buffer management infrastructure and alway use it.
|
Metal isn't fussy about a buffer containing vertices vs. indices vs. uniforms. Mostly. So you build a little buffer management infrastructure and always use it.
|
||||||
|
|
||||||
The nice thing about Buffer allocation in Metal is it can be easily done from any thread. The bad thing is all those little bits of memory are time consuming to track and control, just like in any system. Thus there is a better way.
|
The nice thing about Buffer allocation in Metal is it can be easily done from any thread. The bad thing is all those little bits of memory are time consuming to track and control, just like in any system. Thus there is a better way.
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ Typically bottlenecks are where the main CPU is waiting on something it shouldn'
|
|||||||
|
|
||||||
MapLibre Native makes some use of threads, but not as much as it should. With OpenGL it's not using shared contexts, though it does a lot of work in the Layers to prep for the GL work that has to be done on the main thread. So it's not terrible, but it obviously could be better.
|
MapLibre Native makes some use of threads, but not as much as it should. With OpenGL it's not using shared contexts, though it does a lot of work in the Layers to prep for the GL work that has to be done on the main thread. So it's not terrible, but it obviously could be better.
|
||||||
|
|
||||||
Mobile devices, even the really cheap ones, now have a lot of CPU cores and a lot of opportunity for work to be done off the main thread. Maps have an embarassing amount of high level parallelism. It's worth periodically analyzing the performance to see what might be updated for data loading.
|
Mobile devices, even the really cheap ones, now have a lot of CPU cores and a lot of opportunity for work to be done off the main thread. Maps have an embarrassing amount of high level parallelism. It's worth periodically analyzing the performance to see what might be updated for data loading.
|
||||||
|
|
||||||
The benefits are faster loading, lower latency, better responsiveness to the user.
|
The benefits are faster loading, lower latency, better responsiveness to the user.
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ The following ideas drive the design proposal for the improved API.
|
|||||||
|
|
||||||
* (G1 **`maplibre-native`**) The annotation API should be a part of `maplibre-native`.
|
* (G1 **`maplibre-native`**) The annotation API should be a part of `maplibre-native`.
|
||||||
* (G2 **frictionless migration**) The new API should create as few friction as necessary for existing users of the annotations plugin during migrations.
|
* (G2 **frictionless migration**) The new API should create as few friction as necessary for existing users of the annotations plugin during migrations.
|
||||||
* (G3 **Kotlin-first**) The API should facilitate Kotlin langauge features where appropriate.
|
* (G3 **Kotlin-first**) The API should facilitate Kotlin language features where appropriate.
|
||||||
* (G4 **power**) The annotations API should be as powereful as it was before. No functionality should be lost.
|
* (G4 **power**) The annotations API should be as powereful as it was before. No functionality should be lost.
|
||||||
* (G5 **learnability**) At the same time, it should have a high learnability, such that new users find their way around the API with ease.
|
* (G5 **learnability**) At the same time, it should have a high learnability, such that new users find their way around the API with ease.
|
||||||
* (G6 **ease**) The API should be user-friendly and easy to use.
|
* (G6 **ease**) The API should be user-friendly and easy to use.
|
||||||
@@ -113,7 +113,7 @@ The `setUsedDataDrivenProperties` mechanism should check for variations to the d
|
|||||||
|
|
||||||
The annotations API currently uses code generation to generate the annotation objects. This should no longer be done in the future for the following reasons.
|
The annotations API currently uses code generation to generate the annotation objects. This should no longer be done in the future for the following reasons.
|
||||||
|
|
||||||
* Code generation incentivises non-specific, flat APIs – even where hiearchical objects or other specific constructs make more sense.
|
* Code generation incentivises non-specific, flat APIs – even where hierarchical objects or other specific constructs make more sense.
|
||||||
* In a similar way, it makes it harder to assign documentation to specific method →(G5 **learnability**). The current generated docs don't read like they were written with the Android implementation in mind, because they are copied from the spec.
|
* In a similar way, it makes it harder to assign documentation to specific method →(G5 **learnability**). The current generated docs don't read like they were written with the Android implementation in mind, because they are copied from the spec.
|
||||||
* When switching to Kotlin and when removing the `*Options` classes (G3 **Kotlin-first**), boilerplate code is reduced by a significant amount.
|
* When switching to Kotlin and when removing the `*Options` classes (G3 **Kotlin-first**), boilerplate code is reduced by a significant amount.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ This project is to add the ability to "register" additional layer types at runti
|
|||||||
|
|
||||||
## Proposed Change
|
## Proposed Change
|
||||||
|
|
||||||
For the initial implemention, the following functionality is proposed:
|
For the initial implementation, the following functionality is proposed:
|
||||||
|
|
||||||
* At the platform level, be able to register a plug-in layer that is then parseable by the style parser
|
* At the platform level, be able to register a plug-in layer that is then parseable by the style parser
|
||||||
* The plug-in layer will be limited to simple rendering (via handing off the rendering context to the plug-in layer) and will not include the ability to define drawables/etc
|
* The plug-in layer will be limited to simple rendering (via handing off the rendering context to the plug-in layer) and will not include the ability to define drawables/etc
|
||||||
@@ -18,7 +18,7 @@ Future features:
|
|||||||
* Placeholder for ideas that could be implemented in the future
|
* Placeholder for ideas that could be implemented in the future
|
||||||
|
|
||||||
## Example IOS Utilization
|
## Example IOS Utilization
|
||||||
An example implemention is shown in the PR: https://github.com/maplibre/maplibre-native/pull/3430
|
An example implementation is shown in the PR: https://github.com/maplibre/maplibre-native/pull/3430
|
||||||
The platform/darwin/app/PluginLayerExampleMetalRendering.h/mm class shows how the layer manages it's own rendering and how properties from the style are passed to it. In platform/ios/app/MBXViewController.mm there's a single line where the plug-in layer class is registered with the map view
|
The platform/darwin/app/PluginLayerExampleMetalRendering.h/mm class shows how the layer manages it's own rendering and how properties from the style are passed to it. In platform/ios/app/MBXViewController.mm there's a single line where the plug-in layer class is registered with the map view
|
||||||
```
|
```
|
||||||
[self.mapView addPluginLayerType:[PluginLayerExampleMetalRendering class]];
|
[self.mapView addPluginLayerType:[PluginLayerExampleMetalRendering class]];
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ ARG USERNAME=ubuntu
|
|||||||
ARG USER_UID=1000
|
ARG USER_UID=1000
|
||||||
ARG USER_GID=$USER_UID
|
ARG USER_GID=$USER_UID
|
||||||
|
|
||||||
# Create docker user wuth sudo rights as passed in by the build command
|
# Create docker user with sudo rights as passed in by the build command
|
||||||
# This was modeled on https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user
|
# This was modeled on https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user
|
||||||
# On a Mac, USER_GID might already exist, so ignore it if it fails (--force)
|
# On a Mac, USER_GID might already exist, so ignore it if it fails (--force)
|
||||||
RUN groupmod --gid $USER_GID $USERNAME \
|
RUN groupmod --gid $USER_GID $USERNAME \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# MapLibre Native Core Documentation
|
# MapLibre Native Core Documentation
|
||||||
|
|
||||||
This is the documentation of the public C++ API of MapLibre Native Core. You would normally only use this API if you are a contributor to one of the platform specific APIs. If you want to intergrate use MapLibre Native in your project, you are better served by [documentation specific to your platform](https://maplibre.org/projects/maplibre-native/), unless you are interested in the internals of MapLibre Native.
|
This is the documentation of the public C++ API of MapLibre Native Core. You would normally only use this API if you are a contributor to one of the platform specific APIs. If you want to integrate use MapLibre Native in your project, you are better served by [documentation specific to your platform](https://maplibre.org/projects/maplibre-native/), unless you are interested in the internals of MapLibre Native.
|
||||||
|
|
||||||
The source code can be found [on GitHub](https://github.com/maplibre/maplibre-native) (the `include` directory contains the public API).
|
The source code can be found [on GitHub](https://github.com/maplibre/maplibre-native) (the `include` directory contains the public API).
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ All new code should be written in [Kotlin](https://kotlinlang.org/).
|
|||||||
|
|
||||||
## Style Checking
|
## Style Checking
|
||||||
|
|
||||||
To check Kotlin style, we use [ktlint](https://pinterest.github.io/ktlint/). This linter is based on the [official Kotlin coding conventions](https://kotlinlang.org/docs/coding-conventions.html). We intergrate with it using the [kotlinder](https://github.com/jeremymailen/kotlinter-gradle) Gradle plugin.
|
To check Kotlin style, we use [ktlint](https://pinterest.github.io/ktlint/). This linter is based on the [official Kotlin coding conventions](https://kotlinlang.org/docs/coding-conventions.html). We integrate with it using the [kotlinder](https://github.com/jeremymailen/kotlinter-gradle) Gradle plugin.
|
||||||
|
|
||||||
To check the style of all Kotlin source files, use:
|
To check the style of all Kotlin source files, use:
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[Bazel](https://bazel.build/) is used for building on iOS.
|
[Bazel](https://bazel.build/) is used for building on iOS.
|
||||||
|
|
||||||
You can generate an Xcode project thanks to [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) intergration.
|
You can generate an Xcode project thanks to [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) integration.
|
||||||
|
|
||||||
You need to install [bazelisk](https://github.com/bazelbuild/bazelisk), which is a wrapper around Bazel which ensures that the version specified in `.bazelversion` is used.
|
You need to install [bazelisk](https://github.com/bazelbuild/bazelisk), which is a wrapper around Bazel which ensures that the version specified in `.bazelversion` is used.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Release Policy
|
# Release Policy
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> The following release policiy applies specifically to MapLibre **Android** and MapLibre **iOS**.
|
> The following release policy applies specifically to MapLibre **Android** and MapLibre **iOS**.
|
||||||
|
|
||||||
- We use [semantic versioning](https://semver.org/). Breaking changes will always result in a major release.
|
- We use [semantic versioning](https://semver.org/). Breaking changes will always result in a major release.
|
||||||
- Despite having extensive tests in place, as a FOSS project we have limited QA testing capabilities. When major changes took place we may opt to put out a pre-release to let the community help with testing.
|
- Despite having extensive tests in place, as a FOSS project we have limited QA testing capabilities. When major changes took place we may opt to put out a pre-release to let the community help with testing.
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ property: `background-color`, `line-width`, etc., with a second level of directo
|
|||||||
|
|
||||||
The JSON files in this directory are the manifests (to be passed to render test CLI tool). This directory also contains many directories that store metrics used by the tests. Other files/directories include:
|
The JSON files in this directory are the manifests (to be passed to render test CLI tool). This directory also contains many directories that store metrics used by the tests. Other files/directories include:
|
||||||
|
|
||||||
- `cache-style.db`, `cache-metrics.db`: pre-populated cache (SQLite database file) so the tests can run offline. You may need to update this database when you need a new resource available during test executation.
|
- `cache-style.db`, `cache-metrics.db`: pre-populated cache (SQLite database file) so the tests can run offline. You may need to update this database when you need a new resource available during test execution.
|
||||||
- `binary-size`: binary-size checks. Not used right now, see [#3379](https://github.com/maplibre/maplibre-native/issues/3379).
|
- `binary-size`: binary-size checks. Not used right now, see [#3379](https://github.com/maplibre/maplibre-native/issues/3379).
|
||||||
- `expectations`: expectations for various platforms. E.g. `expectations/platform-android` is referenced by the `android-render-test-runner-metrics.json` manifest under its `expectation_paths` key.
|
- `expectations`: expectations for various platforms. E.g. `expectations/platform-android` is referenced by the `android-render-test-runner-metrics.json` manifest under its `expectation_paths` key.
|
||||||
- `ignores`: contains JSON files with as key a test path and as value a reason why a test is ignored. For example:
|
- `ignores`: contains JSON files with as key a test path and as value a reason why a test is ignored. For example:
|
||||||
@@ -57,7 +57,7 @@ The JSON files in this directory are the manifests (to be passed to render test
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `metrics/intergration`
|
#### `metrics/integration`
|
||||||
|
|
||||||
- `data`, `geojson`, `glyphs`, `image`, `sprites`, `styles`, `tiles`, `tilesets`, `video`: various data used by the render tests.
|
- `data`, `geojson`, `glyphs`, `image`, `sprites`, `styles`, `tiles`, `tilesets`, `video`: various data used by the render tests.
|
||||||
- `expression-tests`: tests that verify the behavior of [expressions](https://maplibre.org/maplibre-style-spec/expressions/) of the MapLibre Style Spec.
|
- `expression-tests`: tests that verify the behavior of [expressions](https://maplibre.org/maplibre-style-spec/expressions/) of the MapLibre Style Spec.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
namespace mbgl {
|
namespace mbgl {
|
||||||
|
|
||||||
// A movable type-erasing function wrapper. This allows to store arbitrary
|
// A movable type-erasing function wrapper. This allows to store arbitrary
|
||||||
// invokable things (like std::function<>, or the result of a movable-only
|
// invocable things (like std::function<>, or the result of a movable-only
|
||||||
// std::bind()) in the queue. Source: http://stackoverflow.com/a/29642072/331379
|
// std::bind()) in the queue. Source: http://stackoverflow.com/a/29642072/331379
|
||||||
class Message {
|
class Message {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
/// Get the *sequenced* scheduler for asynchronous tasks.
|
/// Get the *sequenced* scheduler for asynchronous tasks.
|
||||||
/// Unlike the method above, the returned scheduler
|
/// Unlike the method above, the returned scheduler
|
||||||
/// (once stored) represents a single thread, thus each
|
/// (once stored) represents a single thread, thus each
|
||||||
/// newly scheduled task is guarantied to run after the
|
/// newly scheduled task is guaranteed to run after the
|
||||||
/// previously scheduled one.
|
/// previously scheduled one.
|
||||||
///
|
///
|
||||||
/// Sequenced scheduler can be used for running tasks
|
/// Sequenced scheduler can be used for running tasks
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ public:
|
|||||||
/// Add a polyline in geographic coordinates, using wide vectors.
|
/// Add a polyline in geographic coordinates, using wide vectors.
|
||||||
void addWideVectorPolylineGlobal(const LineString<double>& coordinates, const gfx::PolylineGeneratorOptions&);
|
void addWideVectorPolylineGlobal(const LineString<double>& coordinates, const gfx::PolylineGeneratorOptions&);
|
||||||
|
|
||||||
/// return the curent vertex count
|
/// return the current vertex count
|
||||||
std::size_t curVertexCount() const;
|
std::size_t curVertexCount() const;
|
||||||
|
|
||||||
bool empty() const { return !(drawables.size() || curVertexCount()); }
|
bool empty() const { return !(drawables.size() || curVertexCount()); }
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace gfx {
|
|||||||
/// Graphic primitive type enumeration
|
/// Graphic primitive type enumeration
|
||||||
enum class PrimitiveType : uint8_t {
|
enum class PrimitiveType : uint8_t {
|
||||||
Point, ///< point primitive
|
Point, ///< point primitive
|
||||||
Line, ///< line primive
|
Line, ///< line primitive
|
||||||
Triangle, ///< triangle primitive
|
Triangle, ///< triangle primitive
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ protected:
|
|||||||
/// 1. When releasing GL resources during Renderer destruction
|
/// 1. When releasing GL resources during Renderer destruction
|
||||||
/// (Including calling CustomLayerHost::deinitialize during
|
/// (Including calling CustomLayerHost::deinitialize during
|
||||||
/// RenderCustomLayer destruction)
|
/// RenderCustomLayer destruction)
|
||||||
/// 2. When renderering through Renderer::render()
|
/// 2. When rendering through Renderer::render()
|
||||||
/// (Including calling CustomLayerHost::initialize for newly added
|
/// (Including calling CustomLayerHost::initialize for newly added
|
||||||
/// custom layers and
|
/// custom layers and
|
||||||
/// CustomLayerHost::deinitialize on layer removal)
|
/// CustomLayerHost::deinitialize on layer removal)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
* not provide line, fill or symbol layers (those, used by the annotations
|
* not provide line, fill or symbol layers (those, used by the annotations
|
||||||
* implementation).
|
* implementation).
|
||||||
*
|
*
|
||||||
* Note: in future, annotations implemantation will be moved from the core
|
* Note: in future, annotations implementation will be moved from the core
|
||||||
* to platform SDK (see
|
* to platform SDK (see
|
||||||
* https://github.com/maplibre/maplibre-plugins-android)
|
* https://github.com/maplibre/maplibre-plugins-android)
|
||||||
* and this flag won't be needed any more.
|
* and this flag won't be needed any more.
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
|
|
||||||
struct RenderFrameStatus {
|
struct RenderFrameStatus {
|
||||||
RenderMode mode;
|
RenderMode mode;
|
||||||
bool needsRepaint; // In continous mode, shows that there are ongoig transitions.
|
bool needsRepaint; // In continuous mode, shows that there are ongoig transitions.
|
||||||
bool placementChanged;
|
bool placementChanged;
|
||||||
gfx::RenderingStats renderingStats;
|
gfx::RenderingStats renderingStats;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public:
|
|||||||
std::size_t index,
|
std::size_t index,
|
||||||
std::size_t size) const noexcept;
|
std::size_t size) const noexcept;
|
||||||
|
|
||||||
/// Update the offset, when this buffer is alread bound to the specified index (unchecked).
|
/// Update the offset, when this buffer is already bound to the specified index (unchecked).
|
||||||
void updateVertexBindOffset(const MTLRenderCommandEncoderPtr&,
|
void updateVertexBindOffset(const MTLRenderCommandEncoderPtr&,
|
||||||
std::size_t offset,
|
std::size_t offset,
|
||||||
std::size_t index,
|
std::size_t index,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
/// @brief Get a specific layer group by index
|
/// @brief Get a specific layer group by index
|
||||||
/// @param layerIndex index
|
/// @param layerIndex index
|
||||||
/// @return the layer group if existant, othewise a shared null pointer
|
/// @return the layer group if existent, otherwise a shared null pointer
|
||||||
const LayerGroupBasePtr& getLayerGroup(const int32_t layerIndex) const;
|
const LayerGroupBasePtr& getLayerGroup(const int32_t layerIndex) const;
|
||||||
|
|
||||||
/// Execute the given function for each contained layer group
|
/// Execute the given function for each contained layer group
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ layout (std140) uniform DebugUBO {
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// This vertex shader expects a EXTENT x EXTENT quad,
|
// This vertex shader expects a EXTENT x EXTENT quad,
|
||||||
// The UV co-ordinates for the overlay texture can be calculated using that knowledge
|
// The UV coordinates for the overlay texture can be calculated using that knowledge
|
||||||
v_uv = a_pos / 8192.0;
|
v_uv = a_pos / 8192.0;
|
||||||
gl_Position = u_matrix * vec4(a_pos * u_overlay_scale, 0, 1);
|
gl_Position = u_matrix * vec4(a_pos * u_overlay_scale, 0, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ FragmentStage vertex vertexMain(thread const VertexStage vertx [[stage_in]],
|
|||||||
const float4 position = debug.matrix * float4(float2(vertx.pos) * debug.overlay_scale, 0, 1);
|
const float4 position = debug.matrix * float4(float2(vertx.pos) * debug.overlay_scale, 0, 1);
|
||||||
|
|
||||||
// This vertex shader expects a EXTENT x EXTENT quad,
|
// This vertex shader expects a EXTENT x EXTENT quad,
|
||||||
// The UV co-ordinates for the overlay texture can be calculated using that knowledge
|
// The UV coordinates for the overlay texture can be calculated using that knowledge
|
||||||
float2 uv = float2(vertx.pos) / 8192.0;
|
float2 uv = float2(vertx.pos) / 8192.0;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ void main() {
|
|||||||
applySurfaceTransform();
|
applySurfaceTransform();
|
||||||
|
|
||||||
// This vertex shader expects a EXTENT x EXTENT quad,
|
// This vertex shader expects a EXTENT x EXTENT quad,
|
||||||
// The UV co-ordinates for the overlay texture can be calculated using that knowledge
|
// The UV coordinates for the overlay texture can be calculated using that knowledge
|
||||||
frag_uv = in_position / 8192.0;
|
frag_uv = in_position / 8192.0;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ fn main(in: VertexInput) -> VertexOutput {
|
|||||||
out.position = debug.matrix * vec4<f32>(scaled_pos, 0.0, 1.0);
|
out.position = debug.matrix * vec4<f32>(scaled_pos, 0.0, 1.0);
|
||||||
|
|
||||||
// This vertex shader expects a EXTENT x EXTENT quad,
|
// This vertex shader expects a EXTENT x EXTENT quad,
|
||||||
// The UV co-ordinates for the overlay texture can be calculated using that knowledge
|
// The UV coordinates for the overlay texture can be calculated using that knowledge
|
||||||
out.uv = vec2<f32>(f32(in.position.x), f32(in.position.y)) / 8192.0;
|
out.uv = vec2<f32>(f32(in.position.x), f32(in.position.y)) / 8192.0;
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ namespace style {
|
|||||||
`const char *`; return value:
|
`const char *`; return value:
|
||||||
* is true when evaluated in a boolean context iff the named member
|
* is true when evaluated in a boolean context iff the named member
|
||||||
exists
|
exists
|
||||||
* is convertable to a `V` or `V&` when dereferenced
|
* is convertible to a `V` or `V&` when dereferenced
|
||||||
* `eachMember(v, [] (const std::string&, const V&) -> std::optional<Error>
|
* `eachMember(v, [] (const std::string&, const V&) -> std::optional<Error>
|
||||||
{...})` -- called only if `isObject(v)`; calls the provided lambda once for
|
{...})` -- called only if `isObject(v)`; calls the provided lambda once for
|
||||||
each key and value of the object; short-circuits if any call returns an
|
each key and value of the object; short-circuits if any call returns an
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ std::string toString(const CanonicalTileID&);
|
|||||||
} // namespace util
|
} // namespace util
|
||||||
|
|
||||||
// Has integer z/x/y coordinates
|
// Has integer z/x/y coordinates
|
||||||
// overscaledZ describes the zoom level this tile is intented to represent, e.g.
|
// overscaledZ describes the zoom level this tile is intended to represent, e.g.
|
||||||
// when parsing data z is never larger than the source's maxzoom z/x/y describe
|
// when parsing data z is never larger than the source's maxzoom z/x/y describe
|
||||||
// the
|
// the
|
||||||
class OverscaledTileID {
|
class OverscaledTileID {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ namespace util {
|
|||||||
/// A wrapper around `unordered_map` which uses linear search below some threshold of size.
|
/// A wrapper around `unordered_map` which uses linear search below some threshold of size.
|
||||||
///
|
///
|
||||||
/// Currently an immutable map, not allowing insert or delete, but could be extended to allow that, with extra cost when
|
/// Currently an immutable map, not allowing insert or delete, but could be extended to allow that, with extra cost when
|
||||||
/// transitioning over the threshold value, of course. The maped values can be modified via reference accessors, just
|
/// transitioning over the threshold value, of course. The mapped values can be modified via reference accessors, just
|
||||||
/// not the set of keys or the keys themselves. Since the small-case elements are stored separately from
|
/// not the set of keys or the keys themselves. Since the small-case elements are stored separately from
|
||||||
/// `unordered_map`, we can't use that class' iterators, and its interface is private. A wrapper iterator might allow
|
/// `unordered_map`, we can't use that class' iterators, and its interface is private. A wrapper iterator might allow
|
||||||
/// for a better and more complete public interface.
|
/// for a better and more complete public interface.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
namespace mbgl {
|
namespace mbgl {
|
||||||
|
|
||||||
/// A movable type-erasing function wrapper. This allows to store arbitrary
|
/// A movable type-erasing function wrapper. This allows to store arbitrary
|
||||||
/// invokable things (like std::function<>, or the result of a movable-only
|
/// invocable things (like std::function<>, or the result of a movable-only
|
||||||
/// std::bind()) in the queue. Source:
|
/// std::bind()) in the queue. Source:
|
||||||
/// http://stackoverflow.com/a/29642072/331379
|
/// http://stackoverflow.com/a/29642072/331379
|
||||||
class WorkTask : private util::noncopyable {
|
class WorkTask : private util::noncopyable {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
"probes/gfx/pass-double-probe": "Needs to be investigated and fixed.",
|
"probes/gfx/pass-double-probe": "Needs to be investigated and fixed.",
|
||||||
"probes/gfx/pass-probe-reset": "Needs to be investigated and fixed.",
|
"probes/gfx/pass-probe-reset": "Needs to be investigated and fixed.",
|
||||||
"probes/network/pass": "Needs to be investigated and fixed.",
|
"probes/network/pass": "Needs to be investigated and fixed.",
|
||||||
"render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen": "Temporarily fails as android test app does not derefence symbolinks in sprites folder.",
|
"render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen": "Temporarily fails as android test app does not dereference symbolinks in sprites folder.",
|
||||||
"render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen": "Temporarily fails as android test app does not derefence symbolinks in sprites folder.",
|
"render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen": "Temporarily fails as android test app does not dereference symbolinks in sprites folder.",
|
||||||
"render-tests/line-pattern/overscaled": "Needs to be investigated and fixed.",
|
"render-tests/line-pattern/overscaled": "Needs to be investigated and fixed.",
|
||||||
"render-tests/regressions/mapbox-gl-js#5911a": "Needs to be investigated and fixed.",
|
"render-tests/regressions/mapbox-gl-js#5911a": "Needs to be investigated and fixed.",
|
||||||
"render-tests/regressions/mapbox-gl-native#9976": "Needs to be investigated and fixed.",
|
"render-tests/regressions/mapbox-gl-native#9976": "Needs to be investigated and fixed.",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ std::vector<std::pair<std::string, std::string>> parseIgnores(const std::vector<
|
|||||||
return ignores;
|
return ignores;
|
||||||
}
|
}
|
||||||
|
|
||||||
// defaultExpectationPath: absolute path that constains the style.json file for testing
|
// defaultExpectationPath: absolute path that contains the style.json file for testing
|
||||||
// testId: Test case id that used for composing expectation path
|
// testId: Test case id that used for composing expectation path
|
||||||
// expectatedPaths: absolute paths that contain possible expected.png/metrics.json files for result checking
|
// expectatedPaths: absolute paths that contain possible expected.png/metrics.json files for result checking
|
||||||
std::vector<mbgl::filesystem::path> getTestExpectations(const mbgl::filesystem::path& defaultExpectationPath,
|
std::vector<mbgl::filesystem::path> getTestExpectations(const mbgl::filesystem::path& defaultExpectationPath,
|
||||||
|
|||||||
@@ -1227,7 +1227,7 @@ TestOperations parseTestOperations(TestMetadata& metadata) {
|
|||||||
assert(operationArray[4].IsArray()); // end [lat, lng, zoom]
|
assert(operationArray[4].IsArray()); // end [lat, lng, zoom]
|
||||||
|
|
||||||
if (metadata.mapMode != mbgl::MapMode::Continuous) {
|
if (metadata.mapMode != mbgl::MapMode::Continuous) {
|
||||||
metadata.errorMessage = "Map mode must be Continous for " + panGestureOp + " operation";
|
metadata.errorMessage = "Map mode must be Continuous for " + panGestureOp + " operation";
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ async function writeResultsToOutputDir() {
|
|||||||
const benchmarkResultContents = await fs.readFile(fullBenchmarkResultPath, {encoding: 'utf-8'});
|
const benchmarkResultContents = await fs.readFile(fullBenchmarkResultPath, {encoding: 'utf-8'});
|
||||||
const benchmarkResults = JSON.parse(benchmarkResultContents);
|
const benchmarkResults = JSON.parse(benchmarkResultContents);
|
||||||
const { timestamp } = benchmarkResults;
|
const { timestamp } = benchmarkResults;
|
||||||
if (typeof timestamp !== 'number') throw new Error("No timestamp found in bechmark result");
|
if (typeof timestamp !== 'number') throw new Error("No timestamp found in benchmark result");
|
||||||
await fs.copyFile(fullBenchmarkResultPath, path.join(outputDir, `${timestamp}.json`));
|
await fs.copyFile(fullBenchmarkResultPath, path.join(outputDir, `${timestamp}.json`));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`Error ${err}. Skipping: '${benchmarkResultPath}'`);
|
console.error(`Error ${err}. Skipping: '${benchmarkResultPath}'`);
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ for (let layer of layers) {
|
|||||||
writeIfModified(`src/mbgl/style/layers/${layerFileName}_layer_properties.hpp`, propertiesHpp(layer), outLocation);
|
writeIfModified(`src/mbgl/style/layers/${layerFileName}_layer_properties.hpp`, propertiesHpp(layer), outLocation);
|
||||||
writeIfModified(`src/mbgl/style/layers/${layerFileName}_layer_properties.cpp`, propertiesCpp(layer), outLocation);
|
writeIfModified(`src/mbgl/style/layers/${layerFileName}_layer_properties.cpp`, propertiesCpp(layer), outLocation);
|
||||||
|
|
||||||
// Remove our fake property for the external interace.
|
// Remove our fake property for the external interface.
|
||||||
if (layer.type === 'line') {
|
if (layer.type === 'line') {
|
||||||
layer.paintProperties = layer.paintProperties.filter(property => property.name !== 'line-floor-width');
|
layer.paintProperties = layer.paintProperties.filter(property => property.name !== 'line-floor-width');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ modifiedReferenceSpec["paint_location-indicator"] = {
|
|||||||
"zoom"
|
"zoom"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"doc": "The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence."
|
"doc": "The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearance."
|
||||||
},
|
},
|
||||||
"bearing": {
|
"bearing": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ src:*/mbgl/util/hash.hpp
|
|||||||
#############################################################################
|
#############################################################################
|
||||||
# vendor libs
|
# vendor libs
|
||||||
|
|
||||||
# unsigned integer overflow: unsigned interger index in for loop
|
# unsigned integer overflow: unsigned integer index in for loop
|
||||||
src:*/vendor/earcut.hpp/include/mapbox/earcut.hpp
|
src:*/vendor/earcut.hpp/include/mapbox/earcut.hpp
|
||||||
|
|
||||||
# unsigned integer overflow: hash function: str_hash
|
# unsigned integer overflow: hash function: str_hash
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ async function updateDocumentation(documentationPath, examples) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (status.tag === 'find-codeblock') {
|
if (status.tag === 'find-codeblock') {
|
||||||
throw Error(`Ended evalution while looking for codeblock with id '${status.id}'`);
|
throw Error(`Ended evaluation while looking for codeblock with id '${status.id}'`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status.tag === 'skip-to-codeblock-end') {
|
if (status.tag === 'skip-to-codeblock-end') {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ layout (std140) uniform DebugUBO {
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
// This vertex shader expects a EXTENT x EXTENT quad,
|
// This vertex shader expects a EXTENT x EXTENT quad,
|
||||||
// The UV co-ordinates for the overlay texture can be calculated using that knowledge
|
// The UV coordinates for the overlay texture can be calculated using that knowledge
|
||||||
v_uv = a_pos / 8192.0;
|
v_uv = a_pos / 8192.0;
|
||||||
gl_Position = u_matrix * vec4(a_pos * u_overlay_scale, 0, 1);
|
gl_Position = u_matrix * vec4(a_pos * u_overlay_scale, 0, 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ void generateFillBuffers(const GeometryCollection& geometry,
|
|||||||
gfx::IndexVector<Triangles>& fillIndexes,
|
gfx::IndexVector<Triangles>& fillIndexes,
|
||||||
SegmentVector& fillSegments) {
|
SegmentVector& fillSegments) {
|
||||||
for (auto& polygon : classifyRings(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);
|
limitHoles(polygon, 500);
|
||||||
|
|
||||||
std::size_t totalVertices = totalVerticesCheck(polygon);
|
std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||||
@@ -133,7 +133,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
|
|||||||
gfx::IndexVector<gfx::Lines>& lineIndexes,
|
gfx::IndexVector<gfx::Lines>& lineIndexes,
|
||||||
SegmentVector& lineSegments) {
|
SegmentVector& lineSegments) {
|
||||||
for (auto& polygon : classifyRings(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);
|
limitHoles(polygon, 500);
|
||||||
|
|
||||||
std::size_t totalVertices = totalVerticesCheck(polygon);
|
std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||||
@@ -171,7 +171,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
|
|||||||
lineOptions.type = FeatureType::Polygon;
|
lineOptions.type = FeatureType::Polygon;
|
||||||
|
|
||||||
for (auto& polygon : classifyRings(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);
|
limitHoles(polygon, 500);
|
||||||
|
|
||||||
std::size_t totalVertices = totalVerticesCheck(polygon);
|
std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||||
@@ -223,7 +223,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto& polygon : classifyRings(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);
|
limitHoles(polygon, 500);
|
||||||
|
|
||||||
const std::size_t totalVertices = totalVerticesCheck(polygon);
|
const std::size_t totalVertices = totalVerticesCheck(polygon);
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ void PolylineGenerator<PLV, PS>::generate(const GeometryCoordinates& coordinates
|
|||||||
offsetB = offset;
|
offsetB = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Close previous segement with bevel
|
// Close previous segment with bevel
|
||||||
if (!startOfLine) {
|
if (!startOfLine) {
|
||||||
addCurrentVertex(*currentCoordinate,
|
addCurrentVertex(*currentCoordinate,
|
||||||
distance,
|
distance,
|
||||||
|
|||||||
@@ -649,7 +649,7 @@ void Context::setCullFaceMode(const gfx::CullFaceMode& mode) {
|
|||||||
cullFace = mode.enabled;
|
cullFace = mode.enabled;
|
||||||
|
|
||||||
// These shouldn't need to be updated when face culling is disabled, but we
|
// 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.
|
// Context::setDepthMode.
|
||||||
cullFaceSide = mode.side;
|
cullFaceSide = mode.side;
|
||||||
cullFaceWinding = mode.winding;
|
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.
|
/// in the parameter pack and register it with the shader registry.
|
||||||
|
|
||||||
/// Registration calls are wrapped in a lambda that throws on registration
|
/// 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.
|
/// 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.
|
// Move the center of perspective to center of specified edgeInsets.
|
||||||
// Values are in range [-1, 1] where the upper and lower range values
|
// 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).
|
// if using axonometric perspective (not in public API yet, Issue #11882).
|
||||||
// TODO(astojilj): Issue #11882 should take edge insets into account, too.
|
// TODO(astojilj): Issue #11882 should take edge insets into account, too.
|
||||||
if (!axonometric) {
|
if (!axonometric) {
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ const BufferResource& Context::getTileIndexBuffer() {
|
|||||||
|
|
||||||
const UniqueVertexBufferResource& Context::getEmptyVertexBuffer() {
|
const UniqueVertexBufferResource& Context::getEmptyVertexBuffer() {
|
||||||
if (!emptyVertexBuffer) {
|
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.
|
// 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
|
// 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
|
// 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.
|
/// in the parameter pack and register it with the shader registry.
|
||||||
|
|
||||||
/// Registration calls are wrapped in a lambda that throws on registration
|
/// 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.
|
/// registry instance provided already has conflicting programs present.
|
||||||
(
|
(
|
||||||
[&]() {
|
[&]() {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace mbgl {
|
|||||||
namespace plugins {
|
namespace plugins {
|
||||||
|
|
||||||
// This is really hacky, but wanted to do it here to discuss if the
|
// 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 {
|
struct NonConstLayerTypeInfo {
|
||||||
const char* type;
|
const char* type;
|
||||||
enum class Source {
|
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.
|
/// in the parameter pack and register it with the shader registry.
|
||||||
|
|
||||||
/// Registration calls are wrapped in a lambda that throws on registration
|
/// 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.
|
/// registry instance provided already has conflicting programs present.
|
||||||
(
|
(
|
||||||
[](bool expr) {
|
[](bool expr) {
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ void FillExtrusionBucket::addFeature(const GeometryTileFeature& feature,
|
|||||||
std::size_t index,
|
std::size_t index,
|
||||||
const CanonicalTileID& canonical) {
|
const CanonicalTileID& canonical) {
|
||||||
for (auto& polygon : classifyRings(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);
|
limitHoles(polygon, 500);
|
||||||
|
|
||||||
std::size_t totalVertices = 0;
|
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
|
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
|
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>
|
template <class T, class UniformValueType, class PossiblyEvaluatedType, class... As>
|
||||||
@@ -522,7 +522,7 @@ public:
|
|||||||
const CanonicalTileID&,
|
const CanonicalTileID&,
|
||||||
const style::expression::Value&) override {
|
const style::expression::Value&) override {
|
||||||
if (!patternDependencies || patternDependencies->mid.empty()) {
|
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
|
// the default value for `*-pattern` properties is an empty string
|
||||||
// and will not have a valid entry in patternPositions. We still
|
// and will not have a valid entry in patternPositions. We still
|
||||||
// need to populate the attribute buffers to avoid crashes when we
|
// need to populate the attribute buffers to avoid crashes when we
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ protected:
|
|||||||
|
|
||||||
LayerPlacementData placementData;
|
LayerPlacementData placementData;
|
||||||
|
|
||||||
// will need to be overriden to handle their activation.
|
// will need to be overridden to handle their activation.
|
||||||
LayerGroupBasePtr layerGroup;
|
LayerGroupBasePtr layerGroup;
|
||||||
|
|
||||||
// An optional tweaker that will update drawables
|
// An optional tweaker that will update drawables
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <Metal/MTLCaptureManager.hpp>
|
#include <Metal/MTLCaptureManager.hpp>
|
||||||
#include <Metal/MTLCaptureScope.hpp>
|
#include <Metal/MTLCaptureScope.hpp>
|
||||||
/// Enable programmatic Metal frame captures for specific frame numbers.
|
/// Enable programmatic Metal frame captures for specific frame numbers.
|
||||||
/// Requries iOS 13
|
/// Requires iOS 13
|
||||||
constexpr auto EnableMetalCapture = 0;
|
constexpr auto EnableMetalCapture = 0;
|
||||||
constexpr auto CaptureFrameStart = 0; // frames are 0-based
|
constexpr auto CaptureFrameStart = 0; // frames are 0-based
|
||||||
constexpr auto CaptureFrameCount = 1;
|
constexpr auto CaptureFrameCount = 1;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ void RenderImageSource::update(Immutable<style::Source::Impl> baseImpl_,
|
|||||||
tileIds.push_back(tileCover[0]);
|
tileIds.push_back(tileCover[0]);
|
||||||
|
|
||||||
bool hasVisibleTile = false;
|
bool hasVisibleTile = false;
|
||||||
// Add additional wrapped tile ids if neccessary
|
// Add additional wrapped tile ids if necessary
|
||||||
Range<uint8_t> zoomRange(0, zoom);
|
Range<uint8_t> zoomRange(0, zoom);
|
||||||
auto idealTiles = util::tileCover({.transformState = transformState,
|
auto idealTiles = util::tileCover({.transformState = transformState,
|
||||||
.tileLodMinRadius = parameters.tileLodMinRadius,
|
.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.
|
/// in the parameter pack and register it with the shader registry.
|
||||||
|
|
||||||
/// Registration calls are wrapped in a lambda that throws on registration
|
/// 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.
|
/// registry instance provided already has conflicting programs present.
|
||||||
(
|
(
|
||||||
[](bool expr) {
|
[](bool expr) {
|
||||||
|
|||||||
@@ -878,7 +878,7 @@ using namespace mbgl::style::conversion;
|
|||||||
EvaluationResult Distance::evaluate(const EvaluationContext& params) const {
|
EvaluationResult Distance::evaluate(const EvaluationContext& params) const {
|
||||||
if (!params.feature || !params.canonical) {
|
if (!params.feature || !params.canonical) {
|
||||||
return EvaluationError{
|
return EvaluationError{
|
||||||
"distance expression requirs valid feature and canonical "
|
"distance expression requires valid feature and canonical "
|
||||||
"information."};
|
"information."};
|
||||||
}
|
}
|
||||||
auto geometryType = params.feature->getType();
|
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));
|
std::optional<std::string> imageArg = toString(arrayMember(firstElement, 1));
|
||||||
if (!imageArg) {
|
if (!imageArg) {
|
||||||
error.message =
|
error.message =
|
||||||
"Serialized image section agument has to be of a "
|
"Serialized image section argument has to be of a "
|
||||||
"String type.";
|
"String type.";
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ layerCapabilities['heatmap'] = defaults.require('Source')
|
|||||||
layerCapabilities['raster'] = defaults.require('Source').set('TileKind', 'Raster').finalize();
|
layerCapabilities['raster'] = defaults.require('Source').set('TileKind', 'Raster').finalize();
|
||||||
layerCapabilities['location-indicator'] = defaults.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 split120Line = line => {
|
||||||
const ident = ' ';
|
const ident = ' ';
|
||||||
if (line.length + ident.length > 120) {
|
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
|
// StyledText pairs each code point in a string with an integer indicating
|
||||||
// the styling options to use for rendering that code point
|
// 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
|
// of formatting that can happen when BiDi rearranges inputs
|
||||||
using StyledText = std::pair<std::u16string, std::vector<uint8_t>>;
|
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 pixelsToTileUnits,
|
||||||
const float cameraToAnchorDistance,
|
const float cameraToAnchorDistance,
|
||||||
const bool pitchWithMap) {
|
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
|
// use (since collision circles are laid out in tile units). Ideally, I
|
||||||
// think we should generate collision circles on the fly in viewport
|
// think we should generate collision circles on the fly in viewport
|
||||||
// coordinates at the time we do collision detection.
|
// coordinates at the time we do collision detection.
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
MapLibre Style Spec specifies locales with BCP 47
|
MapLibre Style Spec specifies locales with BCP 47
|
||||||
Android and Intl.Collator implementations speak BCP 47 out of the box
|
Android and Intl.Collator implementations speak BCP 47 out of the box
|
||||||
Darwin implementation requires translation to "Language Identifier"
|
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.
|
parse any valid BCP 47 tag and get out the base language/script/region.
|
||||||
|
|
||||||
Mozilla's version:
|
Mozilla's version:
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ SymbolQuads getGlyphQuads(const Shaping& shapedText,
|
|||||||
for (const auto& positionedGlyph : line.positionedGlyphs) {
|
for (const auto& positionedGlyph : line.positionedGlyphs) {
|
||||||
if (!positionedGlyph.rect.hasArea()) continue;
|
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;
|
const float glyphPadding = 1.0f;
|
||||||
float rectBuffer = 3.0f + glyphPadding;
|
float rectBuffer = 3.0f + glyphPadding;
|
||||||
float pixelRatio = 1.0f;
|
float pixelRatio = 1.0f;
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ std::set<std::size_t> determineLineBreaks(const TaggedString& logicalInput,
|
|||||||
|
|
||||||
std::list<PotentialBreak> potentialBreaks;
|
std::list<PotentialBreak> potentialBreaks;
|
||||||
float currentX = 0;
|
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;
|
const bool hasServerSuggestedBreaks = logicalInput.rawText().find_first_of(ZWSP) != std::string::npos;
|
||||||
|
|
||||||
for (std::size_t i = 0; i < logicalInput.length(); i++) {
|
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) {
|
for (const auto& sourceLayer : *options.sourceLayers) {
|
||||||
// Go throught all sourceLayers, if any
|
// Go through all sourceLayers, if any
|
||||||
// to gather all the features
|
// to gather all the features
|
||||||
auto layer = getData()->getLayer(sourceLayer);
|
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,
|
// 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,
|
// 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
|
// 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];
|
char buffer[32];
|
||||||
snprintf(buffer,
|
snprintf(buffer,
|
||||||
32,
|
32,
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ std::map<std::string, std::string> createTokenMap(const std::string& urlTemplate
|
|||||||
|
|
||||||
// --- extract token values
|
// --- extract token values
|
||||||
// /tiles{path}/tiles.json in tiles/satellite/tiles.json
|
// /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::regex tokenPattern(R"(\{domain\}|\{path\}|\{directory\}|\{filename\}|\{extension\})");
|
||||||
std::string templatePattern = std::regex_replace(
|
std::string templatePattern = std::regex_replace(
|
||||||
urlTemplate, tokenPattern, "(.+)", std::regex_constants::match_any);
|
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);
|
boundsMap = apply_visitor(toBoundsMap, geom);
|
||||||
if (boundsMap.empty()) return;
|
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();
|
currentBounds = boundsMap.begin();
|
||||||
tileY = 0;
|
tileY = 0;
|
||||||
nextRow();
|
nextRow();
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ struct Bound {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Implements a modified scan-line algorithm to provide a streaming interface
|
// 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
|
// 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
|
// 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
|
// 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 percentEncode(const std::string&);
|
||||||
std::string percentDecode(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 {
|
class URL {
|
||||||
public:
|
public:
|
||||||
using Segment = std::pair<size_t, size_t>; // position, length
|
using Segment = std::pair<size_t, size_t>; // position, length
|
||||||
@@ -22,7 +22,7 @@ public:
|
|||||||
URL(const std::string&);
|
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
|
// filename of a path. The extension will contain the preceding ., and
|
||||||
// optionally a preceding @2x specifier. The filename will not contain the file
|
// optionally a preceding @2x specifier. The filename will not contain the file
|
||||||
// extension.
|
// extension.
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr
|
|||||||
/// in the parameter pack and register it with the shader registry.
|
/// in the parameter pack and register it with the shader registry.
|
||||||
|
|
||||||
// Registration calls are wrapped in a lambda that throws on registration
|
// 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.
|
// registry instance provided already has conflicting programs present.
|
||||||
(
|
(
|
||||||
[&]() {
|
[&]() {
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ TEST(Annotations, ViewFrustumCulling) {
|
|||||||
|
|
||||||
// Important premise of this test is "static const float viewportPadding =
|
// Important premise of this test is "static const float viewportPadding =
|
||||||
// 100;" as defined in collision_index.cpp: tests using edge insets are
|
// 100;" as defined in collision_index.cpp: tests using edge insets are
|
||||||
// writen so that padding is 128 (half of viewSize width). If increasing
|
// written so that padding is 128 (half of viewSize width). If increasing
|
||||||
// viewportPadding, increase the padding in test cases below.
|
// viewportPadding, increase the padding in test cases below.
|
||||||
AnnotationTest test;
|
AnnotationTest test;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using namespace mbgl::style;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of style::LayerObserver that forwards all methods to
|
* An implementation of style::LayerObserver that forwards all methods to
|
||||||
* dynamically-settable lambas.
|
* dynamically-settable lambdas.
|
||||||
*/
|
*/
|
||||||
class StubLayerObserver : public style::LayerObserver {
|
class StubLayerObserver : public style::LayerObserver {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using namespace mbgl;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of TileObserver that forwards all methods to
|
* An implementation of TileObserver that forwards all methods to
|
||||||
* dynamically-settable lambas.
|
* dynamically-settable lambdas.
|
||||||
*/
|
*/
|
||||||
class StubTileObserver : public TileObserver {
|
class StubTileObserver : public TileObserver {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(CreateFail)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now, we're "freeing up" some space on the disk, and try to insert and
|
// Now, we're "freeing up" some space on the disk, and try to insert and
|
||||||
// query again. This time, we should be opening the datbase, creating the
|
// query again. This time, we should be opening the database, creating the
|
||||||
// schema, and writing the data so that we can retrieve it again.
|
// schema, and writing the data so that we can retrieve it again.
|
||||||
fs.allowFileCreate(true);
|
fs.allowFileCreate(true);
|
||||||
for (const auto& res : {fixture::resource, fixture::tile}) {
|
for (const auto& res : {fixture::resource, fixture::tile}) {
|
||||||
|
|||||||
@@ -1001,7 +1001,7 @@ TEST(Source, GeoJSONSourceTilesAfterDataReset) {
|
|||||||
|
|
||||||
source.setGeoJSONData(nullptr);
|
source.setGeoJSONData(nullptr);
|
||||||
static_cast<RenderSource&>(renderSource).update(source.baseImpl, layers, true, true, test.tileParameters());
|
static_cast<RenderSource&>(renderSource).update(source.baseImpl, layers, true, true, test.tileParameters());
|
||||||
EXPECT_FALSE(renderSource.isLoaded()); // Tiles remain in continous mode.
|
EXPECT_FALSE(renderSource.isLoaded()); // Tiles remain in continuous mode.
|
||||||
|
|
||||||
source.setGeoJSONData(geoJSONData);
|
source.setGeoJSONData(geoJSONData);
|
||||||
static_cast<RenderSource&>(renderSource).update(source.baseImpl, layers, true, true, test.tileParameters());
|
static_cast<RenderSource&>(renderSource).update(source.baseImpl, layers, true, true, test.tileParameters());
|
||||||
|
|||||||
@@ -380,6 +380,9 @@ TEST(GlyphManager, LocalCJKGlyphPrefersLocalRasterizationOverRange) {
|
|||||||
ASSERT_EQ(testPositions.size(), 1u);
|
ASSERT_EQ(testPositions.size(), 1u);
|
||||||
ASSERT_EQ(testPositions.count(u'々'), 1u);
|
ASSERT_EQ(testPositions.count(u'々'), 1u);
|
||||||
|
|
||||||
|
// Katakana letter te, should be locally rasterized
|
||||||
|
// instead of using the glyph received from the range
|
||||||
|
// for the ideagraphic mark
|
||||||
test.glyphManager.getGlyphs(test.requestor,
|
test.glyphManager.getGlyphs(test.requestor,
|
||||||
GlyphDependencies{.glyphs = {{{{"Test Stack"}}, {u'テ'}}}, // 0x30c6
|
GlyphDependencies{.glyphs = {{{{"Test Stack"}}, {u'テ'}}}, // 0x30c6
|
||||||
.shapes = {}},
|
.shapes = {}},
|
||||||
|
|||||||
@@ -169,8 +169,8 @@ TEST(AsyncTask, scheduleAndReplyValue) {
|
|||||||
loop.stop();
|
loop.stop();
|
||||||
};
|
};
|
||||||
|
|
||||||
std::shared_ptr<Scheduler> sheduler = Scheduler::GetBackground();
|
std::shared_ptr<Scheduler> scheduler = Scheduler::GetBackground();
|
||||||
sheduler->scheduleAndReplyValue(util::SimpleIdentity::Empty, runInBackground, onResult);
|
scheduler->scheduleAndReplyValue(util::SimpleIdentity::Empty, runInBackground, onResult);
|
||||||
loop.run();
|
loop.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,11 +197,11 @@ TEST(AsyncTask, SequencedScheduler) {
|
|||||||
loop.stop();
|
loop.stop();
|
||||||
};
|
};
|
||||||
|
|
||||||
std::shared_ptr<Scheduler> sheduler = Scheduler::GetSequenced();
|
std::shared_ptr<Scheduler> scheduler = Scheduler::GetSequenced();
|
||||||
|
|
||||||
sheduler->schedule(first);
|
scheduler->schedule(first);
|
||||||
sheduler->schedule(second);
|
scheduler->schedule(second);
|
||||||
sheduler->schedule(third);
|
scheduler->schedule(third);
|
||||||
loop.run();
|
loop.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user