Commit Graph

407 Commits

Author SHA1 Message Date
Juha Alanen
6b13c42314 [build] Fix clang format and tidy checks 2019-09-18 14:29:15 +03:00
Juha Alanen
413278ca20 [core] Add feature state support to bucket classes 2019-09-18 14:29:15 +03:00
Juha Alanen
e51fafd4eb [core] Add new types for feature states 2019-09-18 14:29:15 +03:00
Thiago Marcos P. Santos
83a019d021 [build] Fix clang format and tidy checks 2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
a849b38390 [build] Mark explicitly visible symbols
Easier to maintain than a linker script. We build
everything with visibility hidden by default.
2019-09-17 12:28:55 +03:00
Thiago Marcos P. Santos
d424850257 [build] Make the default styles part of GL Native
The reason is applications using it, like GLFW, don't need
to depend on code inside platform/default.
2019-09-17 12:28:55 +03:00
Mikhail Pozdnyakov
796cc3a4d6 [core] Bitmask operations for enums 2019-09-13 13:45:48 +03:00
Mikhail Pozdnyakov
151ea331f8 [core] Use mapbox::base::TypeWrapper instead of utils::peer 2019-09-10 11:51:17 +03:00
Alexander Shalamov
148d65bced [core][node] Serialize formatted expression's text-color option
This enables proper round-tripping for serialized format expression.
2019-08-15 18:25:10 +03:00
Aleksandar Stojiljkovic
73d9f26d03 [core] Limit pitch based on edge insets. Fix max Z calculation in getProjMatrix.
Patch partly fixes #15163 in a way that it doesn't allow loading tens of thousands of tiles and attempt to show area above horizon:

Limit pitch based on edge insets. It is not too bad - current limit of 60 degrees stays active until center of perspective is moved towards the bottom, to 84% of screen height. The plan is to split removal of 60 degrees limit to follow up patch.

Fix max Z calculation in getProjMatrix. TransformState::getProjMatrix calculation of farZ was complex with possibility to lead to negative z values. Replacing it with simpler, precise calculation:
furthestDistance = cameraToCenterDistance / (1 - tanFovAboveCenter * std::tan(getPitch()));

TransformState::getProjMatrix calculation of farZ was an aproximation. Replacing it with simpler, but precise calculation.

Related to: #15163
2019-08-01 09:28:36 +03:00
Juha Alanen
0ca8ea6f16 [core] Add number-format expression 2019-06-27 15:51:22 +03:00
Konstantin Käfer
844299f1c3 [build] remove roundtrip through <experimental/optional> when using optional 2019-06-12 12:04:07 +02:00
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