Commit Graph

3662 Commits

Author SHA1 Message Date
Sudarsana Babu Nagineni
fc0745a699 [core] Fix build when building Qt Location plugin for Android
- log2 is not available on Android before API 18.
- Android doesn't have 'round' on the std:: namespace when using g++.

Co-authored-by: Thiago Marcos P. Santos <thiago@mapbox.com>
2018-08-10 11:19:24 +03:00
Bruno de Oliveira Abinader
20d21cb7bc Revert "[core] Replace Boost.Spirit with std::regex in CacheControl::parse()"
This reverts commit 990b3b11b9.
2018-08-08 19:03:55 +03:00
Chris Loer
4291688b86 [core] Use correct Log::record overload. (#12571) 2018-08-08 10:53:01 -04:00
Bruno de Oliveira Abinader
990b3b11b9 [core] Replace Boost.Spirit with std::regex in CacheControl::parse() 2018-08-08 14:14:34 +03:00
Bruno de Oliveira Abinader
83bd4c2135 [core] Replace remaining dynamic_cast with static_cast 2018-08-08 14:14:34 +03:00
Mikhail Pozdnyakov
15a2623147 [core] Add lineMetrics to GeoJSONOptions
This patch also bumps geojson-vt-cpp version to 6.6.0,
which enables the `lineMetrics` option.
2018-08-08 12:53:32 +03:00
Mikhail Pozdnyakov
0ec4a84c31 Rename EvaluationContext::heatmapDensity to colorRampParameter
More generic name as the same class member is to be used by the
linear gradient properties.
2018-08-07 18:31:59 +03:00
Ivo van Dongen
946db666b9 [core] support windows compilation with msvc2017 and clang 6 2018-08-07 10:13:19 +03:00
Asheem Mamoowala
a5fea5febf Fix TileJSON conversion to allow single point bounds 2018-08-02 12:16:37 -07:00
Molly Lloyd
1a840281b5 [core] don't prefetch tiles for geojson sources (#12529) 2018-08-02 11:43:34 -07:00
Anand Thakker
d25e1a1e7f Relax typing for comparison operators (#12537)
* Relax typing for comparison operators

Ports https://github.com/mapbox/mapbox-gl-js/pull/6961

* Review comments

* Lint fixes
2018-08-02 13:48:47 -04:00
John Firebaugh
9bdd765a02 [core] Merge DataDrivenPropertyValue into PropertyValue (#12513) 2018-07-31 14:21:47 -07:00
Konstantin Käfer
c77aa79f51 [core] update parse_date from cURL 7.61.0 2018-07-31 20:57:09 +02:00
John Firebaugh
9a1bb1ad14 [core] Tweak conversions to reduce binary size
* return {} → return nullopt
* error = { "..." } → error.message = "..."
2018-07-30 17:17:38 -07:00
John Firebaugh
bf7785618a [core] Simplify CompoundExpression implementation 2018-07-30 14:08:27 -07:00
John Firebaugh
85742b908d [core] Avoid unnecessary template instantiations 2018-07-30 14:08:27 -07:00
Sudarsana Babu Nagineni
91ace9d465 Remove use of noncopyable in Context 2018-07-30 12:38:24 +03:00
Sudarsana Babu Nagineni
15a1c7b71f Fix compilation errors with libc++ on QNX 7
This patch fixes the compilation errors on QNX 7:
1) QNX 7 compiler (i.e qcc based GCC 5.4.0 with libc++ from LLVM) has a
limited c++11 feature support and causing the compilation
errors with the inheriting constructors. This fixes the issues by
providing the required constructors explicitly.

2) Resolves an ambiguous overload error with optional<T>
2018-07-30 12:38:24 +03:00
John Firebaugh
10e4ea0f28 [core] Compress all shader source as a single corpus 2018-07-25 11:39:05 -07:00
John Firebaugh
888a516f1f [core] Compress shader source code 2018-07-25 11:39:05 -07:00
John Firebaugh
f6659c729f [core] Use hand-rolled RTTI 2018-07-24 11:08:40 -07:00
John Firebaugh
2bbc792060 [core] Check all bucket dynamic_casts
A mismatch can occur when a layer changes from one type to another.
2018-07-24 11:08:40 -07:00
Bruno de Oliveira Abinader
cb714d57c5 [core] Replace expressions RTTI with enums + static cast 2018-07-24 10:06:18 +03:00
Bruno de Oliveira Abinader
1683da3225 [core] coveredByChildren is false if at least one child is uncovered 2018-07-24 09:18:19 +03:00
Chris Loer
f9b36f9f5b [core] Add symbol-placement: line-center
- Remove unused/vestigial 'maxCameraDistance'
- Create a single collision circle for line labels that are less than half the width of a collision circle
2018-07-23 13:33:27 -07:00
Asheem Mamoowala
1d8664a2ae Keep original input for filters using legacy syntax. 2018-07-23 09:12:26 -07:00
John Firebaugh
af89318b1d [core] Convert token strings to expressions 2018-07-20 12:35:00 -07:00
John Firebaugh
a3d988ab85 [core] Move expression.cpp to expression directory 2018-07-20 11:56:30 -07:00
John Firebaugh
c8edbb0500 [core] Replace {Source,Camera,Composite}Function with PropertyExpression 2018-07-20 11:56:30 -07:00
Justyna Janczyszyn
e94c623e03 fixed typo in error message 2018-07-19 15:36:48 -07:00
Asheem Mamoowala
07b0021ce3 Add fuzz tests for TileCover and fix out of bounds access crash. 2018-07-16 17:11:03 -07:00
Asheem Mamoowala
15019425be Better describe the streaming tilecover algorithm in comments 2018-07-16 17:11:03 -07:00
Asheem Mamoowala
b2ff57c09c Fix TileCover asserts. The create_bounds_towards_* methods were treating
all point arrays as rings. Simplify the logic to only compare against
the next pt in the bound.
2018-07-16 17:11:03 -07:00
Konstantin Käfer
77894f0586 [core] treat parsedate as C++ file to remove C build rules
It is already wrapped with #ifdef __cplusplus extern "C", so we can safely compile it as C++ but retain C linkage
2018-07-16 18:25:09 +02:00
John Firebaugh
a6727921fc [core] Convert legacy functions directly to expressions 2018-07-13 13:37:27 -07:00
John Firebaugh
f7e2fe5e38 [core] Simplify Value conversions
Use a single template function for each of {to,from}ExpressionValue, always dispatching to ValueConverter.

Remove unused ValueConverter::ExpressionType typedefs.
2018-07-12 09:42:55 -07:00
Minh Nguyễn
d6a454ba8e [core] Comparison expressions can have 4th member
When detecting an expression used as a filter, relax the check for expressions to allow comparison expressions to contain a fourth member for the collator.
2018-07-09 16:02:40 -07:00
Chris Loer
c9924ae9d5 [core] Only update collision debug data if debug mode is on
Fixes issue #12294: unused debug vertices would pile up in buckets over course of tile's lifetime.
2018-07-05 11:56:38 -07:00
Mikhail Pozdnyakov
514485502d Rename HeatmapColorPropertyValue to ColorRampPropertyValue
Based on patch from @lbud (Lauren Budorick).

Give `HeatmapColorPropertyValue` a more generic name,
since the same value type will be used for both `heatmap-color`
and `line-gradient` properties.
2018-07-05 15:11:14 +03:00
Chris Loer
d734f670e8 [core] Fix sort order for queryRenderedFeatures when features are filtered.
Fixes issue #12104.
2018-07-03 15:28:00 -07: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
Chris Loer
9ff5d34ef2 [core] Introduce "collator" expressions
Cross platform parsing and evaluation code.
2018-07-03 10:03:05 -07:00
Chris Loer
b9d3ecc990 [core] Introduce LanguageTag for parsing BCP 47 tags 2018-07-03 10:03:05 -07:00
Bobby Sudekum
4286d5869c Add pitch argument to cameraThatFits functions (#12213) 2018-07-02 16:30:18 -07:00
John Firebaugh
647959a853 [core] Add assertions to expression constructors 2018-06-29 15:38:11 -07:00
John Firebaugh
25ac89e018 [core] Remove stops-based *Function constructors 2018-06-29 15:38:11 -07:00
John Firebaugh
6dfe56510c [darwin] Replace use of *Stops with expressions DSL 2018-06-29 15:38:11 -07:00
John Firebaugh
542a4b4501 [core] Replace use of *Stops with expressions DSL 2018-06-29 15:38:11 -07:00
John Firebaugh
16a3f318a1 [core] A filter expression that errors should be treated as false, not true 2018-06-29 15:38:11 -07:00
Konstantin Käfer
ca5b36ba80 [core] fix crash when trying to parse legacy filters
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.
2018-06-29 12:14:51 -07:00