Commit Graph

4100 Commits

Author SHA1 Message Date
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
Mikhail Pozdnyakov
65d2f7ed6a [core] Introduce ProjectedCollisionBox type
ProjectedCollisionBox encapsulates geometry of the projected
collision box, it is using union and thus provides memory save
- 12 bytes per collision box instance.
2019-08-05 16:13:26 +03:00
Mikhail Pozdnyakov
55581b6e61 [core] Remove unused CollisionBox::offset 2019-08-05 16:13:26 +03:00
Mikhail Pozdnyakov
9b34997986 [core] Fix using of uninitialized circle in collision index
In `CollisionIndex::placeLineFeature()` check that previous circle
was initialized before asking its center coordinates.
2019-08-05 16:13:26 +03:00
Alexander Shalamov
d30dc89cf7 [core] Increase round join approximation precision 2019-08-05 13:00:35 +03:00
Alexander Shalamov
5784e326e2 [core] A more accurate algorithm for approximating round line joins
Port for https://github.com/mapbox/mapbox-gl-js/pull/8275
2019-08-05 09:40:15 +03:00
Mikhail Pozdnyakov
187962e425 [core] Fix render tile set source update
Before this change, the `RenderTileSetSource` implementation
ignored update calls for the sources whose description was not yet
loaded and it lead to missing of relayout requests.
2019-08-01 18:20:21 +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
Alexander Shalamov
3b3e4a4772 [core] Fix int overflow issue in GridIndex 2019-07-30 14:46:18 +03:00
Bruno de Oliveira Abinader
6f0cda8c8b [build] Use mapbox-base optional 2019-07-29 18:36:08 +03:00
Mikhail Pozdnyakov
41e30343f7 [core] Shrink RenderOrchestrator::filteredLayersForSource in reduceMemoryUse()
Before this change, `RenderOrchestrator::filteredLayersForSource` shrank inside
`createRenderTree()`, which potentially might have affected rendering performance.
2019-07-29 12:59:10 +03:00
Mikhail Pozdnyakov
8a6a332264 [core] Fix assertion at RenderRasterLayer::prepare()
It shall consider that image data might not be available until
the source loads it.
2019-07-26 11:23:13 +03:00
Mikhail Pozdnyakov
273ad436fb [core] Avoid copying feature properties 2019-07-25 17:36:35 +03:00
Mikhail Pozdnyakov
e6e1e15f95 [core] Simplfy ToGeometryCollection 2019-07-25 17:36:35 +03:00
Mikhail Pozdnyakov
0051fcdbb8 [core] Optimize Query Rendered Features API
This PR filters out invisible layers before quering features
(rather than after, like it happened before).

With this change `API_queryRenderedFeaturesAll` performance test
passes almost two times faster.
2019-07-25 12:58:27 +03:00
Mikhail Pozdnyakov
2c2e8589c3 [core] GeometryCollection must not be implicitly copied 2019-07-24 21:04:56 +03:00
Mikhail Pozdnyakov
a242bd1070 [core] Optimize RenderLineLayer::queryIntersectsFeature 2019-07-24 21:04:56 +03:00
Mikhail Pozdnyakov
ec6650d3c0 [core] Default GeometryTileFeature::getGeometries() implementation 2019-07-24 21:04:56 +03:00
Alexander Shalamov
852fef66ef [core] Force getGeometries() return const ref 2019-07-24 21:04:56 +03:00
Mikhail Pozdnyakov
cafecd3f6f [core] Introduce VertexVector::extend() and use it in placement code. 2019-07-23 16:55:25 +03:00
Alexander Shalamov
d7dd352209 [core] Remove unused field from icon buffer 2019-07-23 15:43:27 +03:00
Alexander Shalamov
ac74fc6d00 [core] Release quad data after vertex buffers are created 2019-07-23 15:43:27 +03:00
Mikhail Pozdnyakov
e582a329ef [core] SymbolBacket creates collision buffers optionally
sizeof(SymbolBucket) : 1024 -> 704
2019-07-22 12:23:39 +03:00
Mikhail Pozdnyakov
11bfe23981 [core] Symbol bucket uses shared layout
sizeof(SymbolBucket): 2296 -> 1024
2019-07-22 12:23:39 +03:00
Mikhail Pozdnyakov
3184cb29db [core] sizeof(SymbolBucket) 2312 -> 2296 2019-07-22 12:23:39 +03:00
Mikhail Pozdnyakov
3a0db3921c [core] Introduce RenderTileSetSource class
Encapsulates the tiles update logic based on the given tile set.
2019-07-22 10:41:03 +03:00
Mikhail Pozdnyakov
ff42997b01 [core] Avoid unneeded tile sets copying at sources code 2019-07-22 10:41:03 +03:00