Commit Graph

17 Commits

Author SHA1 Message Date
Ansis Brammanis
6782d7af37 [core] fix symbol flickering after data updates 2018-01-11 14:07:00 -05:00
Ansis Brammanis
feab36a9fb [core] port minor collision changes from -js (#10764) 2018-01-08 12:57:03 -05:00
Chris Loer
5bfa20d71d Fix distant collision perspective ratios (#10794).
Analog of GL JS issue #5911.
Add native ignore for tilejson-bounds.
2018-01-04 14:24:37 -08:00
Konstantin Käfer
f16ecf5907 [core] don't include .cpp file 2017-12-05 15:53:48 +01:00
Thiago Marcos P. Santos
d8bcc943c5 [core] Android + old libstdc++ build fix 2017-11-27 15:54:17 -02:00
Chris Loer
25cfb5863c [core] Symbol cross-fading.
Hold onto tiles after they've been removed from the render tree long enough to run a fade animation on their symbols.
2017-11-17 10:05:15 -08:00
Chris Loer
4f0e5374c3 [core] Skip fade animation for placed symbols that are currently offscreen.
Don't mark items that are outside the collision grid range as placed.
Requires new ignore because GL JS issue #5654 allows insertion of symbols outside the CollisionIndex range, and those symbols can cascade in to affect items within the viewport.
2017-11-17 10:05:15 -08:00
Ansis Brammanis
22c07596a0 [core] Split MapMode::Still into Static and Tile
`Tile` makes sure the symbols in the resulting tile are tileable while
symbols in `Still` match rendering in `Continuous` mode.
2017-11-17 10:05:15 -08:00
Chris Loer
5bdee52e5c [core] Cleanup in response to review comments 2017-11-17 10:05:15 -08:00
Chris Loer
c0cb210ddc [core] Switch from background to foreground placement
- Background placement code now just generates static symbol buffers
 - Don't render GeometryTiles until their symbols are loaded. This is necessary for the CrossTileSymbolIndex to successfully prevent flicker.
 - SymbolInstances are transferred to SymbolBucket for use on foreground during collision detection
 - Symbols are sorted on foreground by sorting their index buffer but leaving vertex buffers intact (only works within one segment)
 - Vertical glyphs are generated at same time as horizontal glyphs. `reprojectLineLabels` chooses which one to use at render time and hides the other.
 - Icons are now always represented with a single collision box, even if they're placed along a line (this means their rotation alignment may be wrong, but the approach of representing them with multiple collision boxes wasn't very accurate either).
 - Generate vertices for new debug collision boxes and collision circles
 - Only add symbols within tile boundaries (reduces work, avoids double-draw)
 - Update symbol_projection.cpp to support line label projection calls from CollisionIndex.
2017-11-17 10:05:15 -08:00
Chris Loer
18d735ccc2 [core] Add Placement class.
Responsible for running global collision detection/symbol placement algorithm and updating symbol opacity buffers accordingly.
2017-11-17 10:05:15 -08:00
Ansis Brammanis
9309f59de3 split generating symbol quads from collision code
Collision prevention is temporarily disabled.
2015-03-31 15:33:57 -07:00
Ansis Brammanis
7b29c5b257 port some of the text shaping changes 2015-03-30 18:52:25 -07:00
Konstantin Käfer
c07fa06994 rename StyleBucket* => StyleLayout*
and remove a few unused variables

refs #881
2015-02-17 18:27:51 -08:00
Lauren Budorick
895d90409b Add functions for layout properties. 2015-02-03 16:09:58 -08:00
Ansis Brammanis
793985580d fix sprite atlas padding and icon centering
Pad each icon with one pixel on the bottom and right sides.

On top of this, extra padding is added to round the widths and heights
to multiples of four.

This then fixes the positions of the bottom and right vertices to
correctly center the icon's box around the center of the icon, not the
center of the padded icon.

js: 32ca4007699d1d21ab25bb38588b151510194030

fixes https://github.com/mapbox/mapbox-gl-js/issues/947
2015-01-27 19:15:22 -08:00
Konstantin Käfer
abafb52f37 make most headers private 2014-12-04 20:02:50 +01:00