Commit Graph

4150 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
c7bbd5bbef [core] Fix performance-move-const-arg 2019-09-25 18:59:07 +03:00
Thiago Marcos P. Santos
3c23f6f9f7 [core] Fix bugprone-use-after-move
Luckily this is an enum and was being copied.
2019-09-25 18:59:07 +03:00
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
3888af2460 [build] Move compression to platform
It depends on platform specific compression library.
2019-09-20 15:27:52 +03:00
Mikhail Pozdnyakov
097cf5fc39 [core] Clang format fix 2019-09-19 14:51:32 +03:00
Mikhail Pozdnyakov
f04efb69c0 [core] Immutable/Mutable pattern for Placement 2019-09-19 14:51:32 +03:00
Mikhail Pozdnyakov
870f306f68 [core] Update buckets in Renderer 2019-09-19 14:51:32 +03:00
Mikhail Pozdnyakov
f997ae00ae [core] Fix Placement constness
Update buckets methods do not mutate placement, placement methods do not mutate buckets.
2019-09-19 14:51:32 +03:00
Mikhail Pozdnyakov
30e659beed [core] Fix formatting 2019-09-18 16:21:59 +03:00
Mikhail Pozdnyakov
e3137d86d2 [core] Use LayerInfo::tileKind in sources 2019-09-18 16:21:59 +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
7ce9b0d47d [core] Feature state support to RenderLayer classes 2019-09-18 14:29:15 +03:00
Juha Alanen
598df1897d [core] Add feature state support to queryRenderedFeatures 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
46eab5f148 [core] Add SourceFeatureState class to handle feature states 2019-09-18 14:29:15 +03:00
Juha Alanen
1ac8e3c161 [core] Add setFeatureState API to Tile classes 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
91171bc1a9 [core] Add feature-state compound expression 2019-09-18 14:29:15 +03:00
Juha Alanen
9e262ee55f [core] Add feature state support to isFeatureConstant expression 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
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
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
Alexander Shalamov
e3421e042f [core] Fix for FormatSectionOverrides::hasOverride 2019-09-17 11:16:42 +03:00
Mikhail Pozdnyakov
0d9e4afd20 [core] Coalesce buckets updates from several tiles 2019-09-13 13:45:48 +03:00
Mikhail Pozdnyakov
fc741cdd21 [core] Initiate new placement only when a new bucket appeares 2019-09-13 13:45:48 +03:00
Mikhail Pozdnyakov
796cc3a4d6 [core] Bitmask operations for enums 2019-09-13 13:45:48 +03:00
Mikhail Pozdnyakov
f9c15f708e [core] Fix placement for updated buckets
Buckets update initiates new placement, so that
newly added symbols are placed and shown immediately.
2019-09-13 13:45:48 +03:00
Ming Li
14d23a3a4b [core] Fix compilation failure caused by compilation warning for gcc 8
When compiling with gcc 8.3 under linux, I've got compiler error caused
by the following warning:
../src/mbgl/util/chrono.cpp:26:26: error: ‘__builtin___snprintf_chk’ output may be truncated before the last format character [-Werror=format-truncation=]
I need to slightly increase the buffer size to get rid of the warning.
2019-09-12 12:33:42 +03:00
Mikhail Pozdnyakov
8af78ddbb9 [core] Update MapObserver::onDidFinishRenderingFrame() API 2019-09-12 00:40:08 +03:00
Mikhail Pozdnyakov
03dadb1cea [core] Set fading tiles flag at TilePyramid::updateFadingTiles() 2019-09-12 00:40:08 +03:00
Bruno de Oliveira Abinader
6fdf07e3a7 [core] Use mbgl::underlying_type in style properties 2019-09-11 14:29:26 +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
zmiao
f53143f1a1 [core] Fix Integer overflow when converting tileCoordinates to LatLon (#15560)
* [core] fix integer overflow

* [core] Add change log
2019-09-05 11:08:21 +03:00
Julian Rex
96581fd3ff [core, ios] Call transitionFinishFn for jumpTo. (#15473) 2019-09-05 00:21:58 -04:00
Konstantin Käfer
c7be3d52a7 Always call onSourceLoaded observers (#15548)
* [core] add sources to source collection before triggering load

* [test] add testcase for #15514

* [core] also call onSourceLoaded observers when no network request was necessary
2019-09-03 17:02:23 -07:00
Mikhail Pozdnyakov
3b5a43c722 [core] Enable text-offset with variable label placement
Port of https://github.com/mapbox/mapbox-gl-js/pull/8642
2019-09-03 11:45:17 +03:00
Aleksandar Stojiljkovic
4ba1270dcc [core] DEMData: do decode on GPU (port mapbox/mapbox-gl-js#8694)
This is first part of work on porting mapbox/mapbox-gl-js#8694 - in follow up patch(es) it is required to remove CPU side copy using 2d canvas support on all supported platforms, similar to approach taken in gl.js  https://github.com/mapbox/mapbox-gl-js/pull/8694/files#diff-34dbe5f7de34dc4b9a8745dcde9bdc37R48

Decoding on CPU removed.
Padding is still done in DEMData() but, instead od doing it wwhile decoding, it is using memcpy to pad original values.

Rebase to latest mapbox-gl-js master and re-generate shaders.

Partly fixes: #15503
2019-08-30 11:18:55 +03:00
zmiao
6ef2710e5c [core] fix collisionBox alignment when Icon/text translation is enabled (#15467)
* add initial fix

* fix bug for collision circle

* refind code structure

* fix indentation

* update test

* refind code structure

* Add changelog

* Add comment for boolean
2019-08-30 08:24:03 +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
zmiao
c770c23262 [core] fix mixed sdf + non-sdf icon rendering in one layer (#15456)
* [core] fix icon symbol rendring when sdf and non-sdf icon in the same symbol layer

* fix build error

* fix typo

* revert renderableSegment change

* simplify codes

* fix build error

* refine sdf icon flag

* [core] fix mixed sdf + non-sdf icon rendering in one layer

* remove iconstatus getter in stymbol bucket

* fix review findings

* provide bitwise operator for SymbolContent enum

* use MBGL_MBGL_CONSTEXPR

* add one missing update for sdfIcon

* make renderer symbol type as enum
2019-08-26 21:54:59 +03:00
Aleksandar Stojiljkovic
9eff849c74 [core] Fix tileCover / TileCoordinate fromScreenCoordinate(#15442)
Remove unecessary tile coordinate unproject -> project  step.
Unproject+project isn't always a noop and this was the issue leading to wrong cover calculation in high pitch values.

Fixes: https://github.com/mapbox/mapbox-gl-native/issues/15442
2019-08-23 16:43:05 +03:00
Mikhail Pozdnyakov
ef3d04dee5 [core] Export symbol placement update status from MapObserver 2019-08-23 10:56:05 +03:00
Mikhail Pozdnyakov
68de60c8d0 [core] Fill layer pattern change must cause re-layout
Otherwise, pattern properties update is not taken in action.
This caused the following render tests failure:
`build/mbgl-render-test runtime-styling/layer-add-fill regressions/mapbox-gl-js#3107 --recycle-map`
2019-08-22 14:27:27 +03:00
Mikhail Pozdnyakov
a1da06cb68 [core] Fix GeoJSON tiles update
Before this change, GeoJSON tiles data were updated before the
corresponding layers were applied, therefore `GeometryTileWorker`
parsed new data with the outdated layers.

It caused the following render test failure:

`mbgl-render-test text-max-width/unlimited regressions/mapbox-gl-native#9976 --recycle-map`

Now a GeoJSON tile, which needs relayout, is not parsed until the valid layers
are set.
2019-08-22 10:55:56 +03:00