Mikhail Pozdnyakov
1829fb5e40
[core] Placement::commit() handles absence of previuos placement
2019-12-09 17:32:49 +02:00
Mikhail Pozdnyakov
ffd378c68e
[core] Simplify placement code path for still and tile modes
2019-12-09 17:32:49 +02:00
Ansis Brammanis
cdee5b8249
[core] increase padding in CollisionIndex for MapMode::Tile ( #15880 )
...
* [core] fix cutoff cross-tile labels in MapMode::Tile
Increase the CollisionIndex's padding so that more of a tile's data gets
considered when checking for collisions. This should fix clipped
variable placement text labels.
2019-12-06 18:11:25 -05:00
Ansis Brammanis
4fb75ba32c
[core] avoid edges for labels that use text-variable-anchors
...
to prevent clipped labels in rendered image tiles.
2019-10-24 15:39:10 +03:00
Ansis Brammanis
99feb9bb30
[core] fix collisions with icon-text-fit and variable placement ( #15828 )
...
port 61a61a1982cb8c637d467f91da5b0817a61a9de6
2019-10-22 20:30:55 -04: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
0d9e4afd20
[core] Coalesce buckets updates from several tiles
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
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
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
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
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
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
9aa529576f
[core] Implement support for "text-writing-mode" layout property
2019-08-13 13:32:56 +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
cafecd3f6f
[core] Introduce VertexVector::extend() and use it in placement code.
2019-07-23 16:55:25 +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
8574b8b726
[core] Favor previous anchor only when still in the text-variable-anchor options
...
Port of https://github.com/mapbox/mapbox-gl-js/pull/8473
2019-07-17 14:52:47 +03:00
Mikhail Pozdnyakov
d570834975
[core] Remove orchestration methods from RenderTile
2019-07-04 16:56:43 +03:00
Mikhail Pozdnyakov
b242883587
[core] Use fresh transform state for bucket vertices update in placement
...
The transform state cached in placement might get stale and cannot be used for bucket vertices updates.
2019-06-03 17:03:57 +03:00
Mikhail Pozdnyakov
a44b7f1e5d
[core] Avoid unneeded update of symbol dynamic vertex buffer
2019-06-03 17:03:57 +03:00
Mikhail Pozdnyakov
43966f1611
[core] Placement::placeLayerBucket() -> placeBucket()
2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
054645042a
[core] Encapsulate symbol bucket placement code in Placement::placeLayerBucket()
2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
a03f7b166b
[core] RenderTile does not expose Tile
...
RenderTile and Tile will be split when ochestration movces to a separate thread.
This PR improves encapsulation of Tiles management: now performed within TilePyramid.
2019-05-28 16:16:42 +03:00
Mikhail Pozdnyakov
aa3a7cf02f
[core] SymbolBucket updates complete at placement stage
...
`RenderSymbolLayer` does not have to update dynamic vertices of its buckets, this logic is moved to placement (which is already updates opacity vertices).
* fixes clustering of labels when text variable placement enabled - as assignes `usesVariablePlacement` per bucket
* simplifies the code in `RenderSymbolLayer` (the `RenderSymbolLayer::upload()` is now omitted).
* symbol buckets are not modified after orchestration finishes
2019-05-24 10:54:06 +03:00
Mikhail Pozdnyakov
9fe5256ce7
[core] Avoid bucket downcasting in Placement
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
f2ad89c463
[core] Remove RenderLayerSymbolInterface
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
44fd6dcf7c
[core] Placement accepts RenderLayer instances
2019-05-19 18:15:33 +03:00
Mikhail Pozdnyakov
ef48d53e78
[core] Placement order matches viewport-y sort
...
Symbols are placed accordingly to their viewport Y order,
if the style `symbol-z-order` is set to `viewport-y`.
This improves rendering of symbol layers, where icons are allowed
to overlap but not text.
2019-05-08 12:21:47 +03:00
Konstantin Käfer
3ceabcd3ec
[core] clang-tidy fixes
2019-04-05 11:49:17 +02:00
Mikhail Pozdnyakov
94d8cb4f7f
[core] Single line optimization for variable label placement
2019-03-29 16:18:41 +02:00
Mikhail Pozdnyakov
2292623bc6
[core] Introduce variable text placement for point labels - Placement part
2019-03-29 16:18:41 +02:00
Mikhail Pozdnyakov
b39c71eea8
[core] Introduce variable text placement for point labels - Layout part
2019-03-29 16:18:41 +02:00
Bruno de Oliveira Abinader
ba7427b4ac
[core] Transform{State}: s/angle/bearing/
2019-03-04 14:45:32 +02:00
Konstantin Käfer
cd06b550dd
[core] disallow subtyping of gl::Attributes<> and use type aliases instead
2019-03-01 09:33:37 +01:00
Chris Loer
d812babecd
[core] Avoid divide-by-zero when transition duration is 0..
...
Fixes issue #13506 -- transition duration of 0 would cause symbol flickering.
2018-12-11 14:03:34 -08:00
Bruno de Oliveira Abinader
594d2074a3
[core] Let placement transitions use the transition duration, if set, and allow disabling them entirely
2018-11-21 16:43:20 +02:00
Alexander Shalamov
77911f1cc9
[core] Replace RenderSymbolLayer downcast with symbol interface
2018-11-19 14:06:21 +02:00
Chris Loer
d735d89835
[core] Port "collision group" plumbing to gl-native.
...
[node] Hook up map-wide "crossSourceCollisions" option, defaulting to true.
[test] Pass "crossSourceCollisions" test option through test harness; enable cross-source-collisions tests on native.
2018-09-12 14:10:46 -07:00
Chris Loer
5d8abb65e1
[core] Mark allow-overlap symbols visible even outside of collision grid.
...
Fixes issue #12683 .
2018-09-06 08:51:33 -07:00