Commit Graph

4384 Commits

Author SHA1 Message Date
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
Thiago Marcos P. Santos
2ca3fc24a1 [core] Fix bugprone-string-integer-assignment errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
31975e6083 [core] Fix bugprone-integer-division errors
As reported by clang-tidy-8.too_small
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
0f235ac6d5 [core] Fix bugprone-macro-parentheses errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
5bb7ebd7de [core] Fix bugprone-move-forwarding-reference errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
b4e9c0bd11 [core] Fix bugprone-too-small-loop-variable errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
7f422e8696 [core] Fix google-build-explicit-make-pair errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
2280a8a752 [core] Fix google-default-arguments errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
62b543e44a [core] Fix google-explicit-constructor errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Thiago Marcos P. Santos
65f4df5190 [core] Fix google-readability-casting errors
As reported by clang-tidy-8.
2020-03-30 23:37:44 +03:00
Mikko Pulkki
a6ba6c0e85 Fix assert on gfx resource cleanup 2020-03-30 18:01:39 +03:00
zmiao
e9b99a5233 Address review finding
Remove unncessary condition check
2020-03-26 14:13:59 +02:00
zmiao
848f48ac27 [core] Fix within meridian issue 2020-03-26 14:13:59 +02:00
Mikhail Pozdnyakov
735fc0a4dc [core][tile mode] Share seenCrossTileIDs across all placeLayer() calls
Thus we obviate lots of repeated operations for already placed symbols.
2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
313844b1da [core][tile mode] Place tile intersecting labels first, across all layers
Thus, we reduce the amount of label cut-offs in Tile mode.

Before, labels were arranged within one symbol layer (one bucket),
which was not enough for several symbol layers being placed at the
same time.
2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
f5430ca33c [core] Introduce map mode specific Placement implementations 2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
7ba5d5e2dd [core] Introduce Placement::placeLayers() 2020-03-25 15:11:41 +02:00
Mikhail Pozdnyakov
7234cb3968 [core] Ability to set source-layer setProperty method 2020-03-24 20:53:55 +02:00
Mikhail Pozdnyakov
5f1847d9a2 [core] conversion::Layer uses setProperty API to set max/min zoom & filter 2020-03-24 20:53:55 +02:00
Mikhail Pozdnyakov
20d960ed51 [core] Layer::setProperty() can set min/max zoom and filter 2020-03-24 20:53:55 +02:00
Mikhail Pozdnyakov
280b806777 [core] Move generic setProperty() parts to the base Layer class 2020-03-24 20:53:55 +02:00
Thiago Marcos P. Santos
9dbd0a666a [core] Fix modernize-pass-by-value errors
As reported by clang-tidy-8.
2020-03-23 20:05:40 +02:00
Thiago Marcos P. Santos
76b99eb8e8 [core] Fix modernize-deprecated-headers errors
As reported by clang-tidy-8.
2020-03-23 20:05:40 +02:00
Thiago Marcos P. Santos
cee3910f17 [core] Fix modernize-return-braced-init-list errors
As reported by clang-tidy-8.
2020-03-23 20:05:40 +02:00
Alexander Shalamov
71efb24e2d Bump mapbox-base to 1.2.0 2020-03-23 11:33:06 -04:00
Thiago Marcos P. Santos
d15b9c1f9c [core] Fix performance-unnecessary-value-param errors
As reported by clang-tidy-8.
2020-03-23 12:09:09 +02:00
Thiago Marcos P. Santos
37802eec36 [core] Fix performance-type-promotion-in-math-fn errors
As reported by clang-tidy-8.
2020-03-23 12:09:09 +02:00
Thiago Marcos P. Santos
6223fc2898 [core] Fix performance-inefficient-vector-operation errors
As reported by clang-tidy-8.
2020-03-23 12:09:09 +02:00
Thiago Marcos P. Santos
5210d720ad [core] Fix performance-unnecessary-copy-initialization errors
As reported by clang-tidy-8.
2020-03-23 12:09:09 +02:00
Thiago Marcos P. Santos
cedb7368f1 [core] Fix performance-for-range-copy errors
As reported by clang-tidy-8.
2020-03-23 12:09:09 +02:00
Mikhail Pozdnyakov
8bf841a951 [core] Render::clearData clears fonts 2020-03-20 11:43:59 +02:00
Mikhail Pozdnyakov
2ae96ad687 [core] Introduce Renderer::clearData() instead of keepRenderData map options
`Renderer::clearData()` is a better API than the removed `MapOptions::keepRenderData()`:
- gives more flexibility to the client
- similar to the existing `Renderer::reduceMemoryUse()`
- the `MapOptions::keepRenderData()` API implementation could not handle the raise condition, which
happened if the new still image request had come before all tiles from the previous requests were loaded.

Co-authored-by: Dane Springmeyer <dane@mapbox.com>
2020-03-20 11:43:59 +02:00
galinelle
bc45d65c58 Add additional transformState::latLngToScreenCoordinate getter (#16311)
This change adds a latLngToScreenCoordinate overload, to retrieve
the projected vec4 in additional to the ScreenCoordinate object,
that is useful to detect whether the projected latLng is in front
or behind the camera.
2020-03-19 18:53:09 +02:00
zmiao
b45cae286e Refactor within function 2020-03-19 14:40:49 +02:00
zmiao
df79b05178 [core] Using TileCoordinates for geometry comparison 2020-03-19 14:40:49 +02:00
Mikhail Pozdnyakov
6a68305e1e [core] Add ImageManager::clear() 2020-03-18 20:14:15 +02:00
Mikhail Pozdnyakov
b48900b0a7 [core] Add RenderOrchestrator::clearData() 2020-03-18 20:14:15 +02:00
Mikhail Pozdnyakov
3536de5124 [core][tile|static mode] Introduce MapOptions::keepRenderData() flag
Render orchestrator stores the render data between render frames if this flag is set.
2020-03-18 20:14:15 +02:00
Dane Springmeyer
46a6932222 start using tname variable 2020-03-16 11:50:51 +02:00
Mikhail Pozdnyakov
a70b33be8b [core] Fix crash at Placement::getSymbolPlacement() 2020-03-13 14:30:17 +02:00