Commit Graph

395 Commits

Author SHA1 Message Date
Konstantin Käfer
e52ce34fb5 [core] remove platform::show(Color)?DebugImage 2019-05-28 16:11:05 +02:00
Łukasz Paczos
5e00a2a764 [core] limit thread's scope to release the Object before detaching the thread 2019-05-24 13:52:50 +02:00
Łukasz Paczos
7d6255c860 [core] option to perform platform specific operations when creating/destroying core threads 2019-05-22 15:52:55 +02:00
Mikhail Pozdnyakov
e79080771b [core] RenderLayer::render(PaintParameters, RenderSource*) -> render(PaintParameters) 2019-05-22 16:41:10 +03:00
Alexander Shalamov
0344ce36c4 [core] Define max cache size for ImageManager 2019-05-21 06:49:17 -07:00
Konstantin Käfer
da5bd4d6e3 [core] use unique IDs for DrawScopes 2019-05-15 11:57:43 -07:00
Mikhail Pozdnyakov
b39c71eea8 [core] Introduce variable text placement for point labels - Layout part 2019-03-29 16:18:41 +02:00
Ander Conselvan de Oliveira
11de777628 [core] Remove optional from Map::setLatLngBounds()
This is a first step into grouping together bounds related Map methods
into one that takes a "BoundOptions" object. LatLngBounds::unbounded()
replaces an undefined optional<LatLngBounds>.

v2: Document LatLngBounds::unbounded()
2019-03-14 18:33:11 +02:00
Ander Conselvan de Oliveira
a73cc9d8e3 [core] Remove support for setting minimum and maximum pitch
Support for limiting pitch was introduced in commit c4fc89977b ([core]
Added {set,get}{Min,Max}Pitch) in 2017 but was never exposed by the
platform SDKs. Simplify the Map interface by removing this unused
feature.

v2: Add util::PITCH_MIN
2019-03-14 18:33:11 +02:00
Mikhail Pozdnyakov
ceec74f52f [core] peer must not wrap itself 2019-02-28 17:45:21 +02:00
Mikhail Pozdnyakov
810999fadf [core] Simplify util::peer
Remove custom vtable, base implementation on `std::unique_ptr`.
2019-02-28 17:45:21 +02:00
Bruno de Oliveira Abinader
e5ed9d9ddf [core] Use unwrapped longitude for bounds check 2019-02-26 21:17:31 +02:00
Mikhail Pozdnyakov
577e6ee98a [core] Simplify mbgl::Immutable 2019-01-15 22:29:08 +02:00
Alexander Shalamov
a1ca06e304 [core] Introduce Renderer::queryFeatureExtension API
New interface allows it's users to query additional information about
feature that was provided by qRF interface. This is particularly
useful for clustered features.
2018-12-12 15:08:18 +02:00
Bruno de Oliveira Abinader
bf8b24fa8d [build] Update to geometry v1.0.0 2018-11-13 17:28:26 +02:00
Thiago Marcos P. Santos
7ff85374a7 [build] Remove #pragma diagnostic for boost
Boost is now included as a system header and the compiler
should ignore it when issuing warnings.
2018-11-01 16:29:37 +02:00
Mikhail Pozdnyakov
7a9461a8d4 Consolidate style::Layer properties API
The `style::Layer` class now exposes all the properties contained at `style::LayerImpl`.
This allowed to drop `style::Layer::accept()` method usage, avoid the repeated generated code
and thus save some binary size.

This patch is a part of the layers modularization effort.
2018-10-25 22:42:43 +03:00
Ryan Hamley
3ec0231bb7 [core] Avoid wrapping longitude values of exactly 180 and 360 (#12797) (#13006) 2018-10-24 18:38:54 -07:00
Konstantin Käfer
7692be5d15 [core] refactor util::toString to use RapidJSON's stringification 2018-10-23 12:23:40 +02:00
Konstantin Käfer
2766e64973 [core] only include <sstream> when we need it 2018-10-23 12:23:40 +02:00
Konstantin Käfer
eb828dfd29 [core] add the ability to stringy numbers as hex 2018-10-23 12:23:40 +02:00
Konstantin Käfer
43687b4781 [core] add ability to stringify doubles that are integer with and without trailing ".0" 2018-10-23 12:23:40 +02:00
Chris Loer
ce76bde13d [core] Initial implementation of 'format' expression 2018-10-15 13:15:46 -07:00
Molly Lloyd
2cdbe934c2 [windows, qt] fix windows compiler errors, remove tao + tuple polyfill 2018-08-31 13:08:47 -07:00
Molly Lloyd
4a5dc37245 [core] Implement CrossFadedDataDrivenProperty to add support for feature expressions in *-pattern properties 2018-08-31 13:08:47 -07:00
Konstantin Käfer
5e9bbfdd44 [core] introduce TypeListConcat and TypeList::ExpandInto 2018-08-31 13:08:47 -07:00
Konstantin Käfer
abc5043339 [core] simplify attribute/location types 2018-08-31 13:08:47 -07:00
John Firebaugh
8ca419fb2e [core] Evict unused font stacks from GlyphManager 2018-08-17 09:38:39 -07:00
Konstantin Käfer
a3b6fc1498 [build] vendor std::expected polyfill 2018-08-14 17:03:46 -07:00
Bruno de Oliveira Abinader
3952ff5c34 [core] Replace unique_any with peer from mapbox-bindgen 2018-08-08 14:14:34 +03:00
Bruno de Oliveira Abinader
68bed94cd1 [core] Harden Projection::project() 2018-07-09 22:02:49 +03:00
Anand Thakker
cfd436c287 [core] Avoid blocking in Thread<Object> constructor (#12151)
* 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}
2018-07-03 17:17:39 -04:00
John Firebaugh
d176e9bb46 [core] Fix issues in unique_any
* 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
2018-06-25 13:14:52 -07:00
Lloyd Sheng
eb70b89849 [core] Measuring tiles requesting/parsing time using logging (#12152)
* Tile timing

* Refactor logging code

* Keep the scope of `messageStream` constrained

* Make log message more clear

* Fix crash issue if onlineResponse.data is null
2018-06-21 11:24:14 +08:00
Konstantin Käfer
2b2de05612 [core] allow logging error codes and formatting strings at the same time 2018-06-12 17:41:16 +02:00
Konstantin Käfer
d66251234d [core] don't use floating point versions of pow/log
GLIBC 2.27 added new versioned symbols of powf and logf, while the double versions of pow and log remained stable.
Prefer the double version to avoid introducing a dependency on a newer version of GLIBC than strictly necessary.
See https://lists.gnu.org/archive/html/info-gnu/2018-02/msg00000.html
2018-06-04 10:43:21 +02:00
Asheem Mamoowala
4344812ef5 [core] Streaming TileCover for polygonal regions (#11267)
A per-tile streaming algorithm for tile cover on points, lines, and polygons. Works for individual zoom levels, and not zoom ranges.
2018-04-26 07:43:38 -07:00
Minh Nguyễn
d066e94103 [core] Fixed to-rgba with zero opacity 2018-03-30 15:36:32 -07:00
Molly Lloyd
8a283b0306 [core] add support for mapzen terrarium (#11154)
* add support for mapzen terrarium

* Encoding --> DEMEncoding, avoid if statement when unpacking elevation values

* add Terrarium test

* update submodule

* remove redundant checks
2018-02-14 13:17:55 -08:00
Konstantin Käfer
26a00f6a31 [core] prioritize Thread::pause() calls 2018-02-06 18:49:06 +01:00
Konstantin Käfer
93c4a23636 [core] change RunLoop processing to check queue on every iteration 2018-02-06 18:49:06 +01:00
Konstantin Käfer
78f8fd88b4 [core] factor out RunLoop::wake() 2018-02-06 18:49:06 +01:00
Konstantin Käfer
3ef7dab1a8 [core] use the RunLoop's schedule call directly
RunLoop already has a queue, and has the ability to schedule weak mailboxes, so we can remove the duplicate code.
2018-02-06 18:49:06 +01:00
Minh Nguyễn
fb5b8d34f2 Reimplement style values atop NSExpression (#10726)
* [ios, macos] Import headers, not implementation files

* [core] Added accessors for various expression parameters

Added missing parameter accessors to various expression operator classes, as well as a method on InterpolatorBase and Step that enumerates the stops and their values.

* [ios, macos] Silenced warning in test of error condition

* [ios, macos] Made MGLSphericalPosition boxable

* [ios, macos] Implemented array enumeration during conversion

* [ios, macos] Temporarily ignore heatmap layer type

* [ios, macos] Migrated MGLSymbolStyleLayer.text to NSExpression

MGLSymbolStyleLayer.text is now of type NSExpression instead of MGLStyleValue, as a first step toward migrating the entire layer API from style values to expressions.

Implemented conversions from NSExpression to JSON arrays and vice versa. The most common NSExpression functions are now converted into style expressions, but not all of the most common style expression operators are supported yet.

* [ios, macos] Implemented string coercion

* [ios, macos] Color literals

* [ios, macos] Null constant expressions

* [ios, macos] Convert dictionary literals

* [ios, macos] Interpolation expressions

* [ios, macos] to-boolean, to-number, get from object

* [ios, macos] Variable expressions

Implemented custom expression functions for assigning and referring to variables within the context of an expression. Variables are assigned via a “context dictionary” and applied to an subexpression that is given as another argument to the same expression. Also implemented built-in variable expressions for zoom level and heatmap density.

* [ios, macos] Convert colors, offsets, padding in expressions to JSON objects

* [ios, macos] Expression-based style property getters

Implemented a conversion from mbgl::style::PropertyValues to Objective-C JSON objects, which are then converted to NSExpressions.

* [ios, macos] Consolidated property value–expression conversion in MGLStyleValueTransformer

* [ios, macos] Predicate and expression guide

Extracted documentation about predicates from a documentation comment in MGLVectorStyleLayer.h to a new jazzy guide. Added details about NSExpression support as well. Began updating the “For Style Authors” guide to reflect the transition from style values to expressions.

* [ios, macos] Updated style authoring guide

Updated the Information for Style Authors guide to discuss expressions instead of style functions. Included a table mapping style specification expression operators to NSExpression syntaxes.

* [ios, macos] Migrated codegen templates to expressions

* [ios, macos] Applied expression changes via codegen

Ran make darwin-style-code.

* [macos] Migrated macosapp to expressions

* [ios, macos] Updated style function guide

This guide needs to be thoroughly rewritten, but for now the example code has been migrated to expressions.

* [ios, macos] Eviscerated style function tests

* [ios, macos] Updated changelogs

* [ios] Migrated iosapp to expressions

* [ios, macos] Exposed JSON conversion methods publicly

* [ios, macos] Removed MGLStyleValue, MGLStyleFunction
2018-01-24 00:04:02 -08:00
John Firebaugh
76ed5079a5 [core, ios, macos, android] Add data-driven-styling support for text-font 2018-01-10 15:31:12 -08:00
Thiago Marcos P. Santos
d00e56ada0 [windows][core] Add std::tuple replacement for Windows
Windows STL + Clang can't build our IndexedTuple class.
2018-01-08 22:58:20 +02:00
Thiago Marcos P. Santos
af9bb97e47 [windows][core] Add missing != operator to Tileset 2018-01-08 22:58:20 +02:00
Asheem Mamoowala
10a44050f4 Support TileJSON bounds property (#10701)
* [core] Parse TileJSON bounds property
* [core] Add TileRange and LatLngBounds::contains(CanonicalTileID)
Move LatLngBounds::contains impl to cpp file
* [core] Skip tile creation outside of tileset bounds
* [core] Fix TileRange for wrapped bounds and use for CustomTileLoader instead of LatLngBounds comparisons for tiles.
2018-01-05 06:35:31 -08:00
Asheem Mamoowala
5fb9fb1a3c [core] Support wrapped bounds in LatLngBounds::contains and LatLngBounds::intersect. 2017-12-07 09:53:36 -08:00
Asheem Mamoowala
3067b77c65 [core, ios, macos] Implement unique_any and remove linb::any 2017-11-22 13:56:38 -08:00