summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [core] Harden Projection::project()Bruno de Oliveira Abinader2018-07-091-0/+43
|
* [core] Fix sort order for queryRenderedFeatures when features are filtered.Chris Loer2018-07-031-1/+1
| | | | Fixes issue #12104.
* [core] Avoid blocking in Thread<Object> constructor (#12151)Anand Thakker2018-07-032-16/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Introduce AspiringActor, EstablishedActor This pair of objects represents the two-phase (parent-thread / child-thread) construction that's needed to support constructing Thread<Object> without blocking until the child thread is up and running. An `AspiringActor<O>` is responsible for: - ownership of the actor's `Mailbox` - allocating the memory for (but *not* constructing) the target object `O` Using these two pieces--the mailbox and a stable address for `O`--an `AspiringActor<O>` can accept messages for the target object, or provide `ActorRef<O>`s that do so, before the object has actually been constructed by the corresponding `EstablishedActor<O>`. (Such messages are queued in the mailbox until after the object is constructed.) This allows for an `AspiringActor<O>` to be created and safely used by a thread other than the one on which the target object will (eventually) live. An `EstablishedActor<O>` is responsible for managing the lifetime of the target object `O` and the open/closed state of the parent's `mailbox`. The `O` object's lifetime is contained by that of its owning `EstablishedActor<O>`: the `EstablishedActor` constructor executes the `O` constructor via "placement new", constructing it at the address provided by the parent `AspiringActor`, and the `~EstablishedActor` destructor similarly executes the `~O` destructor (after closing the mailbox). `EstablishedActor` should therefore live entirely on the thread intended to own `O`. * Remove Actor#{invoke,ask}
* [core] Introduce "collator" expressionsChris Loer2018-07-031-1/+1
| | | | Cross platform parsing and evaluation code.
* [core] Introduce LanguageTag for parsing BCP 47 tagsChris Loer2018-07-031-0/+45
|
* Add pitch argument to cameraThatFits functions (#12213)Bobby Sudekum2018-07-021-2/+30
|
* [core] Add assertions to expression constructorsJohn Firebaugh2018-06-291-1/+1
|
* [core] Replace use of *Stops with expressions DSLJohn Firebaugh2018-06-298-223/+143
|
* [core] fix crash when trying to parse legacy filtersKonstantin Käfer2018-06-291-0/+4
| | | | Legacy filters aren't part of the style specification, but you can generate them by parsing a legacy filter in a stylesheet, and obtaining the parsed Filter and serializing it.
* [tests] Replaced the ZoomHistory test with a render testJohn Firebaugh2018-06-282-71/+0
|
* [core] Fix issues in unique_anyJohn Firebaugh2018-06-251-4/+36
| | | | | | | * Eliminate unnecessary temporary in VTableStack::move, which also fixes calling the destructor on the incorrect instance * Make move consistent: it destructs the src, not the dest, which is always empty * delete doesn't need a null guard * Conversions to void* don't need a cast
* [core] Fix GCC8's new -Wcatch-value warningsZsolt Bölöny2018-06-253-3/+3
| | | Polymorphic types shouldn't be caught by value, as the warning message says. Catch them by constant reference instead.
* [core] consolidate database opening workflowKonstantin Käfer2018-06-122-27/+4
| | | | | | | | Before this change, we've tried to open the database in read/write, but not create mode. In situations where the database didn't exist yet, this logged an error to the console, and we proceeded to opening it again in read/write/create mode, which actually created the file. The reason we did this is so that we could detect really old caching databases from January 2016 in case a developer upgraded from an older SDK (iOS v3.1 and earlier, Android v3.2 and earlier) that didn't have https://github.com/mapbox/mapbox-gl-native/pull/3715 yet. However, these error messages, while innocent, look scary in the console and some users suspect that it's a bug. This change opens the file directly in read/write/create mode, omitting the first failed attempt. To handle old cache databases, we're now deleting the `http_cache` table, which was the only table in those old databases, and create the new schema, rather than deleting the entire file and recreating the Database object. In most scenarios, this will lead to one fewer opening attempt, while the database migration will continue to work for the few users who upgrade all the way from a January 2016 SDK. Additionally, this fixes a mismatch between the Qt and non-Qt implementation: Qt doesn't support opening a file in read/write mode without the create flag. This means that we've seen a different control flow on Qt compared to the non-Qt implementation when opening a database.
* [core] support moving Database object during a TransactionKonstantin Käfer2018-06-122-2/+30
|
* [test] verify log messages of OfflineDatabase testsKonstantin Käfer2018-06-121-19/+127
|
* [test] add partial message matching support to FixtureLogKonstantin Käfer2018-06-122-9/+28
|
* [test] standardize on database file name and move I/O functions to utilKonstantin Käfer2018-06-121-76/+47
|
* [test] pull out using namespace mbgl to reduce verbosityKonstantin Käfer2018-06-121-66/+3
|
* [core] fix undefined behavior in LineAtlas::addDashKonstantin Käfer2018-06-121-0/+31
|
* [core] Fix crash due to mixing legacy filters and expressions (#12065)Anand Thakker2018-06-061-0/+12
| | | | | | | | | | | | | | | | | | | * Fix crash due to mixing legacy filters and expressions In some cases, (invalid) nested filters that used a mix of legacy filter syntax and expression syntax caused a crash due to a failure to propagate parsing errors from deeper within the filter expression. These errors went undetected in part because these conversion functions returned unique_ptr<Expression> values (or vectors thereof), using {nullptr} to represent a parsing error, but the core expression classes expect unique_ptr<Expression> that are never null. This changes over to using expression::ParseResult (aka optional<unique_ptr<Expression>>), to represent conversion failure the same way we do in the rest of the expression system. * Fix clang 3.8 / gcc 4.9 issue
* [core] offline database - batch region resource insertsIvo van Dongen2018-06-041-0/+54
|
* [build] disable parts of the build that require node when WITH_NODEJS=OFF is setKonstantin Käfer2018-05-242-14/+12
|
* [core] wrap glGetString in `MBGL_CHECK_ERROR` tooKonstantin Käfer2018-05-241-1/+1
|
* Accept constant expressions in non-dds properties (#11960)Anand Thakker2018-05-231-0/+21
| | | Closes #11940
* Clamp TileJSON.bounds latitudes to [-90, 90] (#11964)Asheem Mamoowala2018-05-211-1/+1
| | | Fixes #11963.
* [core] Align URL token replacement behavior with GL JSJohn Firebaugh2018-05-181-0/+3
| | | | I.e. preserve unknown tokens in URLs rather than replacing them with an empty string.
* Merge branch 'release-boba' into masterupstream/fabian-merge-release-4.0.1-masterFabian Guerra2018-05-175-12/+84
|\ | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # mapbox-gl-js # platform/android/CHANGELOG.md # platform/android/MapboxGLAndroidSDK/gradle.properties # platform/android/gradle/dependencies.gradle # platform/darwin/src/MGLVectorTileSource.mm # platform/darwin/src/MGLVectorTileSource_Private.h # platform/ios/CHANGELOG.md # src/mbgl/style/expression/compound_expression.cpp
| * [core] Convert "legacy" filters directly into expressions (#11610)Lucas Wojciechowski2018-05-105-12/+84
| | | | | | Ports the specialized filter-* expressions from GL JS, adding them to src/mbgl/style/expression/compound_expression.cpp
* | [core] Rework spec function/expression taxonomyLauren Budorick2018-05-141-3/+3
| | | | | | Ports https://github.com/mapbox/mapbox-gl-js/pull/6521, updating codegen scripts to parse new expression taxonomy.
* | Avoid exceptions for flow control during database creationJohn Firebaugh2018-05-092-16/+13
| | | | | | | | Unfortuntely, it's difficult to avoid all exceptions, because sqlite3_open_v2 does not reliably return SQLITE_NOTADB if the file is not a database. However, this should avoid cases where developers misinterpret the SQLITE_CANTOPEN exception as a crash, which is the common case.
* | [core] Only run placement for first layer per SymbolBucketChris Loer2018-05-032-11/+16
| | | | | | | | | | | | | | | | | | Native version of mapbox/mapbox-gl-js#6548. Port of mapbox/mapbox-gl-js#6550. Prevents symbols that share the same layout properties from colliding against each other. Bump GL JS pin to get regression test. Rename "bucketName" -> "bucketLeaderID" to make it clearer what it represents.
* | [core] Port is-supported-script to native.Chris Loer2018-04-271-1/+1
| | | | | | | | Native port is much simpler because RTL text support is always enabled.
* | [core] Streaming TileCover for polygonal regions (#11267)Asheem Mamoowala2018-04-262-17/+223
| | | | | | A per-tile streaming algorithm for tile cover on points, lines, and polygons. Works for individual zoom levels, and not zoom ranges.
* | Bump GL JS pin to get tests for global symbol querying.Chris Loer2018-04-251-0/+4
| | | | | | | | | | | | - Pulls over an update to line.vertex.glsl (looks like a no-op?) - Add test ignores for collator, is-supported-script, line-gradient - Exclude collator, is-supported-script, line-gradient from code generation.
* | Merge branch 'release-boba' into masterupstream/fabian-merge-v4.0.0Fabian Guerra2018-04-235-70/+44
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # circle.yml # include/mbgl/style/expression/let.hpp # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/geometry/LatLngBounds.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapGestureDetector.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapKeyListener.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Projection.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/Transform.java # platform/android/MapboxGLAndroidSDK/src/test/java/com/mapbox/mapboxsdk/geometry/LatLngBoundsTest.java # platform/android/MapboxGLAndroidSDKTestApp/src/main/AndroidManifest.xml # platform/android/gradle/dependencies.gradle # platform/android/src/example_custom_layer.cpp # platform/android/src/geojson/point.cpp # platform/darwin/src/NSPredicate+MGLAdditions.mm # platform/darwin/test/MGLExpressionTests.mm # platform/ios/Mapbox-iOS-SDK-nightly-dynamic.podspec # platform/ios/Mapbox-iOS-SDK-symbols.podspec # platform/ios/Mapbox-iOS-SDK.podspec # platform/ios/app/MBXViewController.m # src/mbgl/renderer/layers/render_custom_layer.cpp # src/mbgl/style/conversion/filter.cpp # src/mbgl/style/expression/interpolate.cpp # src/mbgl/style/expression/value.cpp # test/style/filter.test.cpp
| * Don't enforce ["zoom"] constraints for filters (#11672)Anand Thakker2018-04-122-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | * Don't enforce ["zoom"] constraints for filters Fixes #11594 * Add a couple of comments * Fix ambiguous constructor call * ParsingContext(optional<Type>) => ParsingContext(Type)
| * Use a host interface for CustomLayer instead of function pointers (#11553)Asheem Mamoowala2018-04-021-22/+16
| | | | | | | | | | | | Use a host interface for CustomLayer instead of function pointers Co-authored-by: Julian Rex <julian.rex@mapbox.com>
| * [core] Convert GeometryTileWorker to "one-phase" loadingChris Loer2018-04-021-33/+0
| | | | | | | | | | Modest simplification refactoring (issue #10457). Also, fixes issue #11538, which was caused in part by a hole in the vestigial two-phase loading.
| * [core] Round-trip linear interpolatorsMinh Nguyễn2018-03-301-1/+3
| |
| * [test] Update Map.PrefetchTilesupstream/fb-11334-boba-cherry-pickBruno de Oliveira Abinader2018-03-306-61/+74
| |
| * [core] Stringify expression syntax, not function syntaxJohn Firebaugh2018-03-141-12/+13
| |
| * [core] TileJSON conversion clamps bounds longitude to [-180,180], per specAsheem Mamoowala2018-03-091-0/+10
| |
| * [core] Add expression filter support (#11251)Lucas Wojciechowski2018-03-091-76/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * WIP * WIP * WIP * Remove Filter::operator()(const Feature&) * WIP * WIP * WIP * WIP * Hook up expression filter evaluator * Replace `shared_ptr` with &reference * Fill in implementation of `void operator()(const ExpressionFilter&)` * Fix failing tests * Switch back to a shared_ptr per chat with @anandthakker * Fix benchmark compilation * Shot in the dark to fix CI * Shot in the dark to fix CI (part 2) * Shot in the dark to fix CI (part 3) * In src/mbgl/style/conversion/filter.cpp, add a port of isExpressionFilter and use it to decide in Converter<Filter>::operator() whether to parse the incoming JSON as an ExpressionFilter or one of the legacy filter types * Remove bool Filter::operator()(const GeometryTileFeature&) const * Ensure the map zoom is passed into filtering operations wherever applicable * Add expression filter tests * Addressed PR feedback * Implement `NSPredicate *operator()(mbgl::style::ExpressionFilter filter)` * Fix formatting& nit
| * [core] continue loading style even if we mutate itKonstantin Käfer2018-02-231-5/+16
| | | | | | | | When we load a stale style from cache, and the user immediately starts mutating it, we should continue loading the style so that we'll get a fresh copy of the data into our cache and avoid perpetually showing the stale style.
| * [core] Support a range of zooms in TileRange. Accounts for TilePyramid ↵Asheem Mamoowala2018-02-201-1/+12
| | | | | | | | requesting parent tiles of ideal zoom tiles.
* | Merge tag 'ios-v3.7.6' into masterJason Wray2018-03-141-0/+10
|\ \
| * | [core] TileJSON conversion clamps bounds longitude to [-180,180], per specAsheem Mamoowala2018-03-081-0/+10
| | |
| * | [core] Support a range of zooms in TileRange. Accounts for TilePyramid ↵Asheem Mamoowala2018-03-081-1/+12
| | | | | | | | | | | | requesting parent tiles of ideal zoom tiles.
| * | [core] continue loading style even if we mutate itKonstantin Käfer2018-02-271-5/+16
| | | | | | | | | | | | When we load a stale style from cache, and the user immediately starts mutating it, we should continue loading the style so that we'll get a fresh copy of the data into our cache and avoid perpetually showing the stale style.
| * | Cherry pick #11176 for Agua patchAsheem Mamoowala2018-02-121-0/+10
| | |