Commit Graph

2143 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
cf95bc2bb2 [build] Disable clang-format on generated code
Nice to have, but would make maintain the templates a lot harder.
2019-09-25 18:59:07 +03:00
Thiago Marcos P. Santos
381dda31b4 [build] Fix builds with -pedantic 2019-09-20 12:58:02 +03:00
Mikhail Pozdnyakov
152d4c35fc [core] Add LayerTypeInfo::TileKind 2019-09-18 16:21:59 +03:00
Mikhail Pozdnyakov
224d49cc90 [core] Check layer compatibility with source 2019-09-18 16:21:59 +03:00
Juha Alanen
6b13c42314 [build] Fix clang format and tidy checks 2019-09-18 14:29:15 +03:00
Juha Alanen
48f462bc7b [core] Add removeFeatureState API 2019-09-18 14:29:15 +03:00
Juha Alanen
8e19be9d9c [core] Add support for set/getFeatureState APIs 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
75d18e32fc [core] Add feature state support to expression 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
zmiao
0a219d182c [Core] Fix wrong maxzoom setting of tileSet when using URL source (#15581)
* [core] Take max/min zoom option from style if they are set

* [core] std::move input value

* [Core] Add changelogs

* [Core] Fix clang-format reported error

* [Core] fix clang-tidy reported error
2019-09-17 18:00:37 +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
8af78ddbb9 [core] Update MapObserver::onDidFinishRenderingFrame() API 2019-09-12 00:40:08 +03:00
Bruno de Oliveira Abinader
dfaa859d99 [core] Expose mbgl::style::Light::setProperty
Works the same way as mbgl::style::set{Paint,Layout}Property functions.
2019-09-11 14:29:26 +03:00
Mikhail Pozdnyakov
151ea331f8 [core] Use mapbox::base::TypeWrapper instead of utils::peer 2019-09-10 11:51:17 +03:00
Mikhail Pozdnyakov
5207a36074 [core, ios, macos] SDK objects should hold weak pointers to the core style objects (#15539) 2019-09-09 23:55:38 -04:00
Bruno de Oliveira Abinader
544aabd020 [core] Add requiredTileCount to OfflineRegionStatus 2019-08-29 18:22:59 +03:00
Łukasz Paczos
e5c219d035 [core] make padding optional when camera position is requested.
When padding is not provided, the current one that's cached in the TransformState is going to be returned.
2019-08-29 14:51:24 +02:00
Ander Conselvan de Oliveira
21632a66f8 [core] Remove programCacheDir parameter from ProgramParameters
Binary shader support has been removed in commit c2f974f2a5 ([core]
Remove binary shader support). This left-over parameter is not used
anywhere anymore.
2019-08-27 16:23:48 +03:00
Mikhail Pozdnyakov
ef3d04dee5 [core] Export symbol placement update status from MapObserver 2019-08-23 10:56:05 +03:00
zmiao
0f34eb7b25 Indroduce clusterProperty option for aggregation (#15287)
* indroduce clusterProperty option for aggregation

* remove unnecessary codes

* update geojson_option conversion

* fix reviewing findings
2019-08-16 15:03:48 +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
Alexander Shalamov
075d458403 [core] Add style bindings for "text-writing-mode" layout property 2019-08-13 13:32:56 +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
Heather Stenson
fd99a6e570 [docs] Remove references to increasing offline tile limit 2019-07-18 16:27:31 -07:00
Mikhail Pozdnyakov
fa5646d112 [core] Synchronize render passes and render tiles
Before this change render passes were assigned for the
whole layer at properties evaluation stage.

This caused problems, as layer render data are bound
to the tile and these data might differ from tile to
tile, depending on which tile has been updated by the
tile worker and which has not been yet updated.

This change takes into consideration the actual render
passes required for each tile and combines them for
the layer render passes. Naturally, this change also
introduces render pass check for each render layer in
`RenderLayer::render()` implementations.
2019-07-11 15:36:28 +03:00
Mikhail Pozdnyakov
c144591322 [core] Introduce LayerProperties::constantsMask()
Constants mask for data-driven paint properties is a reliable
criteria of whether the given updated properties can still be used
with the existing bucket (and the gl program instance).
2019-07-02 16:05:09 +03:00
Julian Rex
e611e57271 [core] Minor change to silence documentation warning on iOS. 2019-07-02 11:44:20 +03:00
Juha Alanen
0ca8ea6f16 [core] Add number-format expression 2019-06-27 15:51:22 +03:00
Bruno de Oliveira Abinader
1a9e07e4ed [core] DefaultFileSource dynamic support for cache-only requests 2019-06-25 20:10:21 +03:00
Thiago Marcos P. Santos
68e3cbacbc [core] Add method for setting a maximum size for the ambient cache
- Removed this parameter from the constructor, now that we
  have a method to set it.
- Add the method and enforce the limits if the ambient cache exceeds the
  size.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
78eeffe171 [core] Clear/Invalidate should also work on non-tile resources
These methods were only affecting tiles, but they should really
work on every resource like style, glyphs, etc.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
59e7b9a878 [core] Rename resetCache to resetDatabase
Avoid confusion about what is being reset. In this case, the whole
database and not only the ambient cache.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
5b4bb1398b [core] Surface cache management APIs
These APIs need to be on the DefaultFileSource in order to
be visible for the SDKs bindings.
2019-06-13 22:28:16 +03:00
Konstantin Käfer
844299f1c3 [build] remove roundtrip through <experimental/optional> when using optional 2019-06-12 12:04:07 +02:00
Mikhail Pozdnyakov
f5631d8ef5 [core] Make tile id unwrapTo() const 2019-06-10 19:36:47 +03:00
Konstantin Käfer
e52ce34fb5 [core] remove platform::show(Color)?DebugImage 2019-05-28 16:11:05 +02:00
Konstantin Käfer
7f9274035b [core] refactor program object creation 2019-05-28 16:11:05 +02:00
Thiago Marcos P. Santos
33ee7e23de [core] Remove priority from the constructor
Make the constructor less verbose and set good defaults.
2019-05-28 16:30:49 +03:00
Thiago Marcos P. Santos
cc26ef17d5 [core] Introduce usage tag for resources
Make the distinction if a resource is being requested for offline
usage or if it will be used immediately.

Fixes #14746
2019-05-28 16:30:49 +03:00
Aleksandar Stojiljkovic
9809c9f8f5 [core] Offset viewport center when edge insets are specified
The change is implemented in TransformState::getProjMatrix, the rest of the code is making sure that existing API contracts stay and there are tests verifyingrendering and render query processing only items within screen and given tolerance around screen edges.

MapView: don't bake edge insets into relalculated camera center. Keep edge insets as property of camera in TransformState (similar to pitch, zoom, bearing) independent from specified camera center. Interpolate edge insets in animation.

iOS Demo app: "Turn On/Off Content Insets" pitch the camera and navigate to convenient location in Denver, where streets are parallel to cardinal directions, to illustrate viewport center offset when edge insets are set.

Tests:
ViewFrustumCulling: although Annotations are deprecated, queryRenderedFeatures related tests in Annotations would need to get ported and decided to add the edge insets related query tests next to them. Verify frustum culling (render+queryRenderedFeatures) With different camera and edge insets setups. TODO: port Annotations tests.

Transform.Padding: Verify that coordinates take proper place on screen after applying edge insets.

LocalGlyphRasterizer: verify text rendering when applying padding.

Related to #11882: both use projection matrix elements [8] and [9].

Alternative approach to this was to increase and offset map origin so that the screen would be a sub-rectangle in larger map viewport. This approach has a drawback of unecessary processing the items that are outside screen area.

Fixes #12107, #12728, navigation-sdks/issues/120
2019-05-28 14:38:01 +03:00
Łukasz Paczos
46ef2d86d2 [core] invoke optional resource path change completion listener 2019-05-24 15:03:55 +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
100eb61fa4 [core] Forward ImageManagerObserver::onRemoveUnusedStyleImages to MapObserver interface 2019-05-21 06:49:17 -07:00
Alexander Shalamov
0344ce36c4 [core] Define max cache size for ImageManager 2019-05-21 06:49:17 -07:00