Commit Graph

4339 Commits

Author SHA1 Message Date
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
Mikhail Pozdnyakov
05657e9573 [core] Binary size fixup 2020-03-12 23:35:55 +02:00
Mikhail Pozdnyakov
0bf8fdae9c [core] Collision index uses doubled padding with the tilted view 2020-03-12 23:35:55 +02:00
Mikhail Pozdnyakov
57810759ef [core] Variable labels stick to latest anchor if the view is tilted
This is done in order to improve labels stability and for the performace reasons.
2020-03-12 23:35:55 +02:00
Mikhail Pozdnyakov
f29865f31d [core] Do not squeeze placement period if the view is tilted
If the view is not tilted, we want the new symbols to show up faster, so we squeeze the placement period.

On contrary, with the tilted view it's more important to make placement rarely for performance reasons and as the new symbols are normally "far away" and the user is not that interested to see them ASAP.
2020-03-12 23:35:55 +02:00
Mikhail Pozdnyakov
7a2126bebb [core] Place already visible symbols first and hidden symbols last 2020-03-12 23:35:55 +02:00
kevin
f98cf0cd4b [core] Not filter express in in filter. 2020-03-11 21:53:12 +02:00
Mikhail Pozdnyakov
b83de65813 [core] Adjust mapbox-gl-native for the updated debug shader semantics 2020-03-11 16:51:45 +02:00
Mikhail Pozdnyakov
6c26e141a8 Bump mapbox-gl-js 2020-03-11 16:51:45 +02:00
Mikhail Pozdnyakov
cc5e86b186 [core][tile mode] Fix assertion at line-center placement handling
The `symbolIntersectsTileEdges` algorithm should not be applied to the symbols with `line-center` placement
2020-03-10 20:32:34 +02:00
Mikhail Pozdnyakov
260148878c [core] CollisionIndex::intercectsTileEdges -> intersectsTileEdges 2020-03-06 23:46:52 +02:00
Mikhail Pozdnyakov
42068691c8 [core] Tile mode placement algorithm must consider icons bounding boxes
Tile mode placement algorithm now checks if bounding boxes for both label text and icon are intersecting the edges of the tiles.

Before, it checked only text bounding boxes and thus label icons might have got cut off.
2020-03-06 23:46:52 +02:00
zmiao
f23599c41d [core] Remove unnecessary intermediate PolygonFeature 2020-03-05 20:53:16 +02:00
zmiao
aa0c9c267f [core] Fix within expression serialization + fix within expression equal operator 2020-03-05 20:53:16 +02:00
zmiao
c69d3b46b1 [core] Fix within case when point is on polygon boundary 2020-03-05 20:53:16 +02:00
zmiao
9fbcb45c89 [core] Make within expression support generic geoJSON data 2020-03-05 20:53:16 +02:00
Alexander Shalamov
81e116d41a [core] Use weak annotation manager
Map and renderer / orchestrator should be able to run on a separate threads,
however, legacy AnnotationManager is shared between Map and Renderer, therefore
is not a thread safe. Until AnnotationManager is deprecated and removed from a
code-base, use it only via weak pointers.
2020-03-05 17:43:37 +02:00
Mikhail Pozdnyakov
44ac1f008a [core] Drop BucketPlacementParameters 2020-03-03 16:13:48 +02:00
Mikhail Pozdnyakov
24fa599903 [core] Split LayerPlacementData and BucketPlacementData 2020-03-03 16:13:48 +02:00
Mikhail Pozdnyakov
f748972fe9 [core] Get rid of LayerPlacementData::firstInBucket 2020-03-03 16:13:48 +02:00
Mikhail Pozdnyakov
dea1063319 [core] Encapsulate placement code handling symbols sort ranges 2020-03-03 16:13:48 +02:00
Aleksandar Stojiljkovic
42469cdb66 Disable depth in heatmap offscreen rendering.
It triggers Metal depth stencil validation error since depth test is enabled with no depth attachment.
2020-03-02 12:19:58 +02:00
Mikhail Pozdnyakov
01c056f46d [core] Fix iterators in addRegularDash()
Fix using of invalid iterators.
2020-02-28 21:42:03 +02:00
Thiago Marcos P. Santos
427d785848 [build] Make csscolorparser and parsedate vendors
They have a different license from the rest of the code
and this will make it explicit. Also the script for generating
the license will dectect them correctly.
2020-02-27 18:19:31 +02:00
Mikhail Pozdnyakov
aad13f6a3f [core] FileSourceManager::getFileSource() returns PassRefPtr 2020-02-26 22:31:59 +02:00
Alexander Shalamov
e55a46e5d1 [core] Fix Color serialization 2020-02-26 18:15:23 +02:00
Alexander Shalamov
8785f77cd6 [core] Generate layer code 2020-02-26 18:15:23 +02:00
Alexander Shalamov
713299c429 [core] Add layer serialization method 2020-02-26 18:15:23 +02:00
zmiao
18f9c29617 Backport https://github.com/mapbox/mapbox-gl-js/pull/9333 2020-02-26 16:05:28 +02:00
Juha Alanen
f3c8cefc7f [core] Return pitch bounds in degrees 2020-02-26 11:21:04 +02:00
Juha Alanen
fdf6bb3e34 [core] Add min and max pitch options 2020-02-25 16:54:44 +02:00
Mikhail Pozdnyakov
75f861fe47 [core] Dismiss actors from sprite loader
and get rid of `SpriteLoaderWorker`, use `scheduleAndReplyValue()` API instead.
2020-02-24 14:02:57 +02:00
zmiao
7cdb526dcc [core] Add bounding box overlapping check before line within polygon test 2020-02-21 21:39:48 +02:00
zmiao
385fcd52a0 [test-runner] Add new metrics 2020-02-21 21:39:48 +02:00
zmiao
b9425dd4ec [core] Remove unnecessary includes, fix comments
This reverts commit b5c386ad7708ca9fe14f219b0ffc94cf6ce8fc88.
2020-02-21 21:39:48 +02:00
zmiao
351f421080 [core] Update unti tests. Remove unnecessary debugging code 2020-02-21 21:39:48 +02:00
zmiao
6764ab4675 [core] Move geometry within algorithm to util 2020-02-21 21:39:48 +02:00
zmiao
0cc042434d [core] Add support for "line within polygon" 2020-02-21 21:39:48 +02:00
Alexander Shalamov
b97f40469b [core] Fix sprite sheet merging in Style::Impl::onSpriteLoaded
If we get a new sprite sheet from the server, we need to merge current
sprite sheet with a new one, while overwiting duplicates and keeping
old unique images in a style.
2020-02-17 10:14:05 +02:00
Kevin Li
02274e7601 [core] Implement 'in' expression. (#16162)
* Implement in.cpp

* Fix review comments.

* Add expression_equality test for 'in'

* Fix review comments.

* [core] Update changelog.

* [core] Update mapbox-gl-js

* [core] Ignore render-tests/debug/padding

* [core] Update baseline.
2020-02-15 17:36:57 +08:00
Konstantin Käfer
a876c965a5 [core] Store SegmentVectors in ephemeral render objects
We used some shared SegmentVectors, e.g. for drawing raster or background tiles.
In longer running maps, this lead to resource accumulation. By storing the SegmentVectors
and the contained gfx::DrawScope objects, we ensure that resources get released
when the associated render objects vanish.
2020-02-14 17:34:00 +02:00
Karim Naaji
21107e0c1a Port line-dasharray fix from gl-js
* Fix artifact for zero-lenghted dash array
Fixes issue https://github.com/mapbox/mapbox-gl-js/issues/9213 and add
render test for coverage around 0-length dash arrays

Update distance field generation for regular dashes as follows:
1. Compute the dash array ranges and stretch location along the distance field
2. Collapse any 0-length distance field range
3. Collapse neighbouring same-type parts into single part

* combine consecutive dashes and parts

https://github.com/mapbox/mapbox-gl-js/pull/9246
https://github.com/mapbox/mapbox-gl-native/issues/16181
2020-02-14 12:56:54 +02:00
Alexander Shalamov
89eab0530d [core] Set priorData from cache only if resource is useable
In cases when cached resource is useable, yet don't have an expiration
timestamp, we provided data to the requester from the cache and the same
data was returned once 304 response was received from the network.
2020-02-14 11:54:02 +02:00
Alexander Shalamov
12d350ec3c Revert "[core] Fix excessive onSpriteLoaded() notifications"
This reverts commit 80cb05420a.
2020-02-14 11:54:02 +02:00
Mikhail Pozdnyakov
80cb05420a [core] Fix excessive onSpriteLoaded() notifications
What happened:

The excessive `onSpriteLoaded()` notifications were caused by the trick inside `OnlineFileRequest::completed()` implemenation,
which causes receving of two file source updates pointing to the *same* data in case the network response is `notModified` and
the local storage has the sprite sheet already stored inside.

In the SpriteLoader` implementation, it resulted in 2 extra `parseSprite()` calls and 2 extra `onSpriteLoaded()` notifications.

Then, the excessive `onSpriteLoaded()` notifications affected style images and all the unnecessarily added image dupes (btw,
the amount of these dupes `= 2 * number of style images`) were treated by the `RenderOrchestrator` as *updated* images.

Further, `RenderOrchestrator` called `ImageManager::updateImage()` for the updated images and the `ImageManager` populated the
`updatedImageVersions` map.

Finally, at every frame all the geometry tiles iterated through the `updatedImageVersions` to check whether their uploaded
textures needed patching.

All the mentioned above had a negative performance impact.

The fix:

Now, `SpriteLoader` sends `onSpriteLoaded()` notifications only if the data in the file source response is different comparing
to the existing one.
2020-02-12 20:49:26 +02:00
zmiao
759dfe8bf6 [core] Support [within expression] with layout property 2020-02-12 17:35:18 +02:00