Commit Graph

4423 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
8fb3ea0b53 [core] Fix clang-analyzer-optin.cplusplus.VirtualCall
Detected by clang-tidy-8.
2020-04-17 23:48:21 +03:00
Thiago Marcos P. Santos
f82e375bc7 [core] Fix android-cloexec-fopen warning
Detected by clang-tidy-8.
2020-04-17 23:48:21 +03:00
Gali Nelle
fea8a83e7f Introduce a mean to add render features in layers with no sources
This change also uses the support in the LocationIndicator layer, to
return a point feature when queried in correspondence of the location
indicator.
2020-04-17 22:26:32 +03:00
Gali Nelle
cbb3a56c2a Use unique_ptr for RenderLocationIndicatorImpl 2020-04-17 16:52:56 +03:00
Luke Seelenbinder
efe604c392 Better structure fix. 2020-04-17 16:50:11 +03:00
Luke Seelenbinder
40cfb77b7d Fix segfault resulting from an invalid geometry. 2020-04-17 16:50:11 +03:00
Thiago Marcos P. Santos
ea2477f2ea [core] Fix performance-no-automatic-move (bonus)
As reported by clang-tidy-10. We don't run clang-tidy-10 yet. We
should probably consider moving the bots at some point so errors
like this won't return.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
cc8b0e1746 [core] Fix performance-noexcept-move-constructor in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
b49517b737 [core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
542c11ae63 [core] Fix modernize-use-equals-default errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
7751e4be76 [core] Fix google-default-arguments errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
c92be2965c [core] Fix misc-unconventional-assign-operator errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
ed99a7781a [core] Fix google-build-namespaces errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
63ef5298cd [core] Fix modernize-use-override errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
a1e5bffa90 [core] Fix performance-type-promotion-in-math-fn errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
4cdc067636 [core] Fix modernize-return-braced-init-list errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
46fa691596 [core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
563d4b6cac [core] Fix performance-move-const-arg errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
83b43bb38c [core] Fix modernize-pass-by-value errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
ee2eb13a55 [core] Fix bugprone-forward-declaration-namespace errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
aab575263f [core] Fix performance-unnecessary-copy-initialization errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
c4cb026fa4 [core] Fix readability-redundant-member-init errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Thiago Marcos P. Santos
dffe00feea [core] Fix readability-avoid-const-params-in-decls errors in header files
As reported by clang-tidy-8.
2020-04-17 13:36:50 +03:00
Alexander Shalamov
ffea0af9bf Add generic setter for 'source' property
- Add setter for 'source' property
- Test generic setters via setProperty method
2020-04-16 13:52:54 -04:00
Gali Nelle
545a09fcb3 Fix LocationIndicator not updating image sizes when image manager content changes 2020-04-16 11:56:02 +03:00
Mikhail Pozdnyakov
364ea4b3b7 [core] RenderCircleLayer fixes 2020-04-14 22:30:40 +03:00
Mikhail Pozdnyakov
3ba2fc6ea2 [core] CircleLayout fixes 2020-04-14 22:30:40 +03:00
Andrew Hay Kurtz
0c95acf103 Enable 'circle-sort-key' layout property 2020-04-14 22:30:40 +03:00
Łukasz Paczos
f79334c124 when removing an image use the correct list ptr for presence verification
This fixes an issues where calling `removeImage` would crash if the image was not present and the original list was not empty.
2020-04-10 16:55:17 +02:00
Gali Nelle
209857f8ac Fix LocationIndicator Layer
This changes image size properties to be scales instead of pixel sizes.
The commit also adds fixes for handling image updates with the same ID,
adds tests for expressions in paint properties, as well as tests for using images
with pixel ratio greater than 1.
Finally it moves image-tilt-displacement and perspective-compensation properties
from layout to paint properties, and includes other minor cleanups.
2020-04-10 00:15:43 +03:00
Mikhail Pozdnyakov
e6c156420d [core] PlacedSymbolData contains layer id 2020-04-09 17:18:21 +03:00
Mikhail Pozdnyakov
5a9fa44d55 [core][tile mode] Support variable placement + icon-text-fit 2020-04-08 17:00:21 +03:00
Gali Nelle
8e581c88ea Make location indicator bearing a paint property
This change introduces a new property type, Rotation, that uses
a custom interpolator, and that is currently applied to
all style properties named "bearing", with a period attribute.
2020-04-08 14:00:26 +03:00
Gali Nelle
9a55c282fe Add LocationIndicatorLayer
New key is "G" in mbgl-glfw, cycling between no puck, centered
in the viewport and positioned in Tokyo.
2020-04-08 14:00:26 +03:00
Mikhail Pozdnyakov
fd218daa00 [core][tile mode] Fix placement mismatch for the labels with same geomerty 2020-04-08 11:19:37 +03:00
Mikhail Pozdnyakov
88337c23f7 [core][tile mode] Improve placement algorithm for variable labels 2020-04-08 11:19:37 +03:00
Mikhail Pozdnyakov
8165b7dee1 [core][tile mode] Placement algorithm improvements
Now, the intersecting symbols are placed across all layers according to the following rules:
1) First we look, which of the tile border(s) the symbol intersects and prioritize the the symbol accordingly (high priority -> low priority):
vertical & horizontal -> vertical -> horizontal

2) For the symbols that intersect the same tile border(s), assuming the tile border split symbol into several sections, we look at the minimal section length.
The symbol with a larger minimal section length is placed first.

3) Finally, for the symbols that intersect the same tile border(s), and have equal minimal section length, we look at the anchor Y cordinate.
2020-04-08 11:19:37 +03:00
Mikhail Pozdnyakov
e6bac0eb9f [core] Symbol by symbol placement for intersections 2020-04-08 11:19:37 +03:00
Mikhail Pozdnyakov
a32672b9e6 [core] Introduce PlacementContext
Make `placeSymbol()` a method and introduce copiable `PlacementContext`.
2020-04-08 11:19:37 +03:00
zmiao
bf4c7340f3 [build] Fix undefined behavour sanitizer (#16375)
* [build] Fix integer overflow runtime error for core part

Temporarily remove circle ci UBSAN build precondition

* [build] Enable all of the ubsans

[build] Check runtime error

[build] Update UBSAN_OPTION

* [build] Add UBSAN blacklist

[build] Ignore system libraries

[build] Ignore vendor library

* [build] Fix implicit conversion runtime error in core

* [build] Fix division by zero runtime error

* [build] Add unfixed error to ubsan blacklist

* [build] Make UBSAN halt on error

Revert "Temporary remove build precondition"

* [build] Fix division by zero error

* [build] Make UBSAN officially work without FIXME prefix

* [build] Fix implicit conversion from int64_t to uint64_t

* [build] Rename style test json file name

* Address review findings
2020-04-07 16:30:30 +03:00
Mikko Pulkki
d0c103fa8f Refactor tileCover to support lod tiles 2020-04-06 12:10:21 +03:00
Mikhail Pozdnyakov
c3b68fe91b [core] PlacedSymbolData includes viewport padding 2020-04-02 11:50:52 +03:00
Mikhail Pozdnyakov
3412331e4a [core][tile mode] Implement API to collect placed symbols data 2020-04-02 11:50:52 +03:00
Mikhail Pozdnyakov
5f4e33b1a3 [core] Introduce API to collect placed symbols data
The following methods are added to the `Renderer` class:
- `collectPlacedSymbolData()`
  enables or disables collecting of the placed symbols data

- `getPlacedSymbolsData()`
  if collecting of the placed symbols data is enabled, returns the
  reference to the `PlacedSymbolData` vector holding the collected data.
2020-04-02 11:50:52 +03:00
Alexander Shalamov
15f73a06f2 [core] Add setMaxOverscaleFactorForParentTiles 2020-04-01 16:18:55 -04:00
Aleksandar Stojiljkovic
881d5dab6a Hillshade bucket fix https://github.com/mapbox/mapbox-gl-native-ios/issues/240
Fixes: https://github.com/mapbox/mapbox-gl-native-ios/issues/240
2020-04-01 18:21:04 +03:00
Juha Alanen
a67aaca56b [core] Move logging off the main thread 2020-04-01 11:17:43 +03:00
Thiago Marcos P. Santos
349c6153de [build] Disable clang-format for generated code (#16358)
The code should be human readable but it is more important
if the code in the generator itself is easier to understand.

Nobody wants to play clang-format golf with these generators.
2020-03-31 22:48:56 +03:00
Thiago Marcos P. Santos
1c5e0ee31e [core] Fix misc-* errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
94d1c10727 [core] Fix readability-* errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00