Commit Graph

1601 Commits

Author SHA1 Message Date
Alexander Shalamov
3b1a8b8c30 [core] Add unit test for Source::setPrefetchZoomDelta
Test verifies that tile pyramid will request only 4 tiles for
current zoom level, if Source's setPrefetchZoomDelta is 0.
2020-02-11 10:40:30 +02:00
Alexander Shalamov
ac50f5275b [core] Make CustomGeometrySource::TileOptions immutable 2020-02-11 10:40:30 +02:00
Alexander Shalamov
def38cf4db [core] Override default prefetch delta if source has it's own setting 2020-02-11 10:40:30 +02:00
Thiago Marcos P. Santos
47f2b20435 [build] Remove unused files
Buck build is no longer needed, neither is the previous
CMake buildsystem.
2020-02-07 20:12:44 +02:00
Thiago Marcos P. Santos
f7fef70e9d [build] Move the next buildsystem to the root
This will make the `next` buildsystem no longer the `next`, but the
`actual`. The idea is to simplify the build, removing scripts, to
make the platform buildsystem generated by CMake more compatible
with IDEs and make development more streamlined. It will also make
cross compilation easier.
2020-02-07 20:12:44 +02:00
Mikhail Pozdnyakov
bdd7324d62 Add OfflineDatabase.UpdateDatabaseReadOnlyMode unit test 2020-02-07 14:39:03 +02:00
Mikhail Pozdnyakov
2365cab58c Add OfflineDatabase.PutResourceReadOnlyMode unit test 2020-02-07 14:39:03 +02:00
Alexander Shalamov
5789faf11a [core] Add unit test for global settings object 2020-02-06 23:54:19 +02:00
Juha Alanen
d4d96fd88c [test] Enable HTTP server on Android 2020-02-06 17:52:12 +02:00
Juha Alanen
aed25c0438 [test] Improve the stability of a test on Android 2020-02-06 17:52:12 +02:00
Thomas Moenicke
b64ed75444 [build] Adding a build flag to build without GL if needed (#16120)
* [build] Adding a build flag to build without GL if needed

* [build] Moving custom layer to mbgl/gl
2020-02-03 19:10:57 +02:00
Juha Alanen
4778c0ab6b [build] Enable unit tests for Qt MacOS builds in CI 2020-01-30 13:52:09 +02:00
Juha Alanen
f2845990bb [test] Remove node.js based HTTP server 2020-01-30 13:52:09 +02:00
Juha Alanen
b0e16ec9cb [test] Switch to C++ HTTP server 2020-01-30 13:52:09 +02:00
Alexander Shalamov
96dd401f3e [core] Add unit test for pausing & resuming database fs 2020-01-27 14:25:37 +03:00
Mikhail Pozdnyakov
a2edfc79f0 Add CrossTileSymbolLayerIndex.offscreenSymbols test 2020-01-22 14:30:26 +02:00
Mikhail Pozdnyakov
a9d04d7b1a [core] Do not index and place the off-screen symbols for overscaled tiles
For overscaled tiles the viewport might be showing only a small part of the
tile, so we filter out the off-screen symbols to improve the performance.
2020-01-22 14:30:26 +02:00
Mikhail Pozdnyakov
e6ddcf9beb [core] Simplify CrossTileSymbolIndex::addLayer() 2020-01-22 14:30:26 +02:00
Konstantin Käfer
5a1e4c6b81 [core] implement stretchable icons for icon-text-fit 2020-01-15 15:02:11 +02:00
Konstantin Käfer
027e803b72 [core] move icon rotation from shaping to quad generation to mirror JS 2020-01-15 15:02:11 +02:00
Konstantin Käfer
1342cb44b3 [core] Remove unused WritingMode from getIconQuads 2020-01-15 15:02:11 +02:00
Konstantin Käfer
7d8d13ce04 [core] Change ImagePosition from storing non-padded rect to padded rect to mirror the JS implementation 2020-01-15 15:02:11 +02:00
Konstantin Käfer
47dc5727ab [core] parse stretchX, stretchX, and content from sprite JSON files 2020-01-15 15:02:11 +02:00
Konstantin Käfer
62b0f4cde2 [core] Add stretches and content to style::Image 2020-01-15 15:02:11 +02:00
Konstantin Käfer
4b171cccf1 [core] getGlyphQuad -> getGlyphQuads 2020-01-15 15:02:11 +02:00
Alexander Shalamov
879c44f661 [core] Modularize FileSource codebase (#15768)
* [core] Introduce FileSourceManager and use it for default platform impl

  - Add `FileSourceManager` interface that provides access to `FileSource`
    instances and means of registering / unregistering `FileSource` factories
  - Split `DefaultFileSource` into smaller parts
  - Add `DatabaseFileSource` interface and it's default implementation
  - Remove inter-dependencies between concrete `FileSource` classes

* [build] Add files to next build system

* [core] Add generic property setters / getters

* [core] Remove setOnlineStatus from OnlineFileSource interface

* [core] Hide threading implementation details from DatabaseFileSource interface

* [core] Make DB file source methods virtual

* [core] Add documentation for DatabaseFileSource and rename one method

* [core] Use simple callback instead of ActorRef

* [core] Remove ActorRef from OnlineFileSource public header

* [core] Add callback to FileSource::forward async API

* [core] Pass OfflineRegionDefinition by value

* [core] Update tests to use modular file sources

* [core] Update unit tests

* [core] Update unit tests after rebase

* [core] Backport low prio fix for cached requests

* [core] Backport pack database

* [core] Return removed factory from unRegisterFileSourceFactory

* [core] Rename shadowed args in onlinefilesource

* [core] Remove simple std::function callback aliases

* [core] Expose online file source property keys in public header file

* [test-runner] Add proxy file source test runner

* [cache] Update mbgl-cache utility to use new file source

* [metrics] Rebaseline binary size metrics

* [offline] Update offline utility

* [core] Update changelog
2020-01-13 10:57:23 +02:00
Juha Alanen
c7c441167d [test] Increase the threshold for Map.Offline test on Android 2020-01-10 17:19:30 +02:00
Juha Alanen
d3b5f06c8e [test] Skip number-format expression tests on Android 2020-01-10 17:19:30 +02:00
Juha Alanen
0b3942572e [test] Run unit tests as NativeActivity application on Android 2020-01-10 17:19:30 +02:00
Peng Liu
236afc0395 [android][core] Add Map::latLngBoundsForCameraUnwrapped and jni binding for getVisibleCoordinateBounds. (#16069)
* [android] Add getVisibleCoordinateBounds method.
* Fix Map::latLngBoundsForCamera, add Android binding for getVisibleRegionBounds.
* Add unit tests for CameraToLatLngBoundsWithRotation and CameraToLatLngBoundsCrossDateLine.
* Move API breaking changes to a new method name latLngBoundsForCameraUnwrapped.
2020-01-09 15:53:23 +02:00
Mikhail Pozdnyakov
28ccb0ccc0 [core] Offline download must clear batch buffer at load interrupt
Otherwise, the stale buffer data are processed again at the
repeated load. It is causing various problems like missing load
completion notification or crashes (if the previously used observer
instance has been deleted).
2019-12-18 17:19:15 +02:00
Aleksandar Stojiljkovic
2fd9d4a1fe Include padding when testing camera scale in cameraForLatLngBounds
Repurpose LatLngBoundsToCameraWithBearingAndPitch to test scaling and camera setup, both with and without padding.
This adds testing of path not covered in mapbox/mapbox-gl-native-ios#59.
2019-12-17 16:19:33 +02:00
Andrew Hay Kurtz
da4eb01bc7 [core] Enable 'line-sort-key' and 'fill-sort-key' layout properties (#15839)
- Generate style code for 'line-sort-key' and 'symbol-sort-key'

- Add new layout properties to FillLayer::Impl, FillBucket, and FillLayerFactory

- Fix consistency of paint and layout properties type alias usage in FillBucket, LineBucket

- Add optional feature sorting to fill and line Layout creation

- Enable node render tests for fill-sort-key and line-sort-key

- Fix FillBucket test construction

- Prefer emplace_back to push_back for PatternFeature container

- Fix buggy static_cast for PatternFeature indices

- Maintain sort of features as they are created

- Switch pattern layout features container to list from vector for better insert performance

- Fix formatting expected by sanity check

- Use subclass PatternLayoutSorted to work around lack of template functions

- Fix to retain source order for features with equivalent sort keys during sorting

- [core] Fix clang-format

- [core] Address review comments

- [core] Pass inserting strategy class at compile time

- [core] Use sorted strategy only if sort key is defined in layout

- [core] Update style generator

- [core] Merge PatternLayout and PatternLayoutSorted classes

  - Use static methods for inserter strategies
  - Merge PatternLayout and PatternLayoutSorted classes
2019-12-17 14:25:19 +02:00
Thiago Marcos P. Santos
7dad386f46 [tests] Fix -Werror=shadow issues in the unit tests 2019-12-12 17:44:11 +02:00
Alexander Shalamov
89665326c2 [core] Add unit test for calculateTileDistances 2019-12-09 17:26:13 +02:00
Alexander Shalamov
d36958997b [core] Add unit test for getAnchors and remove unused field 2019-12-09 17:26:13 +02:00
Alexander Shalamov
60b61a08f4 [core] Add unit test for tagged string's image sections 2019-12-02 17:11:49 +02:00
Alexander Shalamov
72e9388a61 [core] Add unit tests for Formatted class 2019-12-02 17:11:49 +02:00
Alexander Shalamov
614000256b [core] Shape images in labels at bucket zoom level 2019-12-02 17:11:49 +02:00
Alexander Shalamov
26bf566f53 [core] Use new 'SymbolTextAndIcon' program to draw icons in text 2019-12-02 17:11:49 +02:00
Alexander Shalamov
2c49c4374c [core] Store 'sdf' flag in vertex attribute 2019-12-02 17:11:49 +02:00
Alexander Shalamov
2bb2a40b6d [core] Shape images in labels and create image quads 2019-12-02 17:11:49 +02:00
Alexander Shalamov
34a9bc08ce [core] Pass images and evaluated layout text size to shaping 2019-12-02 17:11:49 +02:00
Alexander Shalamov
a9c3b5a389 [core] Add evaluated images to styled text sections 2019-12-02 17:11:49 +02:00
Alexander Shalamov
a01ecc92a0 [core] Add image sections to format expression 2019-12-02 17:11:49 +02:00
Mikhail Pozdnyakov
7bacf5696c [core] Introduce Pass<> class and use it for Scheduler
Thus we enforce client to retain the returned `Scheduler` objects.
2019-12-02 14:12:18 +02:00
Mikhail Pozdnyakov
6d4e5f57ec [core] Add OfflineDatabase.Pack unit test 2019-12-02 13:46:51 +02:00
Mikhail Pozdnyakov
4c49f0c9db [core] Introduce OfflineDatabase::runPackDatabaseAutomatically() API
- added a unit test
- Updated inline comments in default_file_source.hpp
2019-12-02 13:46:51 +02:00
Mikhail Pozdnyakov
6419cd0ab2 [core] Calculate GeoJSON tile geometries in a background thread
Call `mapbox::geojsonvt::GeoJSONVT::getTile()` in a background
thread, so that the rendering thread is not blocked.
2019-11-29 11:12:55 +02:00
Mikhail Pozdnyakov
cd4136ed4b [core][android][darwin] Fix GeoJSONOptions handling
- share the `GeoJSONOptions` instances using `Immutable<GeoJSONOptions>` - avoid extra copying
- fix wrapping of the `GeoJSONOptions` instances in supercluster map/reduce lambdas.
  Previously, local variables were wrapped by reference.
2019-11-29 09:53:28 +02:00