Commit Graph

4126 Commits

Author SHA1 Message Date
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
Asheem Mamoowala
0e3a7416e5 [core] Don't overwrite locally renderable glyphs with remote glyphs 2019-08-21 12:00:26 +03:00
Ansis Brammanis
888d2b06ec speed up fading when zooming even more
And a linear adjustment seems to make more sense.
2019-08-20 13:34:22 +03:00
Ansis Brammanis
7d9b54a573 [core] make symbols fade out faster while zooming out
Zooming outcan make symbols overlap quickly. The area previously covered
by the viewport is covered by a lot of colliding labels while the
surrounding area has no labels. This difference produces an unwanted
effect.

This reduces that effect by:
- reducing the fade duration while zooming out
- doing placement more frequently while zooming out
2019-08-20 13:34:22 +03:00
Alexander Shalamov
9ba700fd47 [core] Fix combination of icon-text-fit with text-variable-anchors and text-writing-mode 2019-08-20 12:31:02 +03:00
Konstantin Käfer
71a334152a [core] also remove version info in ImageManager when removing an image (#15397) 2019-08-19 13:54:30 -07:00
Thiago Marcos P. Santos
6dfe0e60ca [core] Fix use after std::move detected by clang-tidy
Detected by the bot being setup at
https://github.com/mapbox/mapbox-gl-native/pull/15385.
2019-08-19 13:37:23 +03:00
Mikhail Pozdnyakov
c7169e6f8d [core] Fix layer impl cast in render layer implementations
This PR puts `impl()` functions definitions into a nameless namespace
to provide internal linkage and to make sure that appropriate cast function
is invoked.
2019-08-16 18:33:30 +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
5f477e310b [core] Check type of a convertible value when constructing legacy filter 2019-08-16 00:19:30 +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
cd129612c1 [core] Clear collision text boxes between symbol placement iterations 2019-08-14 13:54:53 +03:00
Mikhail Pozdnyakov
f660e1be2d [core] Enable variable placement with allowed text overlap 2019-08-13 15:20:46 +03:00
Mikhail Pozdnyakov
ead7132548 [core] Simplifications to variable text placement code path 2019-08-13 15:20:46 +03:00
Alexander Shalamov
1b9d4d792c [core] Render half-width glyphs in upright orientation
This change forces glyphs whose natural orientation in vertical writing
mode is 'sideways' to be rendered in upright orientation (only for non complex
text layouts). This is different compared to W3C / browser behavior that is by
default, renders glyphs in their respective natural orientation.

In the future, there  might need to add a new layout property that would control
glyph orientation separately (e.g., text-glyph-orientation: natural | upright).
2019-08-13 13:32:56 +03:00
Alexander Shalamov
03bb17f8c5 [core] Use constexpr map for verticalized punctiation 2019-08-13 13:32:56 +03:00
Alexander Shalamov
44c92b837a [core] Break lines for vertical writing mode 2019-08-13 13:32:56 +03:00
Alexander Shalamov
be974ea65c [core] Rotate text collision box based on text-rotation value 2019-08-13 13:32:56 +03:00
Alexander Shalamov
9aa529576f [core] Implement support for "text-writing-mode" layout property 2019-08-13 13:32:56 +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
7cdeed7cb4 Changelog entries and a nit for #15281 2019-08-08 12:14:48 +03:00
Aleksandar Stojiljkovic
8cf5103452 [core] Reuse flyTo constant screen velocity calculation for easeTo implementation.
When using flyTo for easeTo:
Limit zoom out to min(startZoom, targetZoom).
Reduce cinematic zoom in animation at the end of transition,
Linear zoom interpolation.

The patch also sets linear interpolation for flyTo edgeInsets animation, as it looks more appropriate to follow the approach taken for pitch and bearing.

Fixes: #15144
2019-08-08 12:14:48 +03:00
Aleksandar Stojiljkovic
9ed6a84df6 [core] easeTo: linear interpolation over zoom instead of scale
Fixes: 15144
2019-08-08 12:14:48 +03:00
Aleksandar Stojiljkovic
8103a2b028 [core] Enable opaque pass for background layer. fix heatmap+background test.
Follow the approach from mapbox-gl-js for enabling opaque pass for background layer (same as for fill layer).

Fix combinations/heatmap-translucent--background-opaque render test.
2019-08-05 18:56:07 +03:00
Mikhail Pozdnyakov
c763c262c8 [core] Remove ProjectedCollisionBox from CollisionBox
- Minus 20 bytes from CollisionBox size.
- Fix constness at Placement::placeBucket
2019-08-05 16:13:26 +03:00