-
Notifications
You must be signed in to change notification settings - Fork 1.3k
port labeling, symbol sorting, and reparsing overscaled tiles #1666
Conversation
Collision prevention is temporarily disabled.
-js doesn't have this here because it subtracts the buffer earlier. https://github.com/mapbox/mapbox-gl-js/blob/617e590c833040407508606b9dbdae2abc3a305d/js/symbol/glyph_source.js#L75 We should match -js eventually.
line-height or padding can make the height of a shaped object <= 0. In these cases either create no boxes, or create boxes with a minimum height to avoid creating too many of them. -js: 9e78c02d8b22b60a08fdb28fd29eef1642f62d94
Conflicts: src/mbgl/renderer/symbol_bucket.cpp src/mbgl/renderer/symbol_bucket.hpp src/mbgl/text/collision.cpp src/mbgl/text/glyph_store.cpp src/mbgl/text/placement.cpp src/mbgl/text/rotation_range.cpp
-js: e99ed95aaba5e79c322733b32e03518b12203a79
-js: 37a498a7aa2c37d6b94611b614b4efe134e6dd59
Conflicts: src/mbgl/map/tile_parser.cpp src/mbgl/map/tile_parser.hpp src/mbgl/renderer/painter.hpp src/mbgl/renderer/painter_symbol.cpp src/mbgl/renderer/symbol_bucket.cpp src/mbgl/renderer/symbol_bucket.hpp src/mbgl/text/collision.cpp src/mbgl/text/collision.hpp src/mbgl/text/placement.cpp
so that layout property functions are applied correctly and so that label placement is redone js: mapbox/mapbox-gl-js#1005 and mapbox/mapbox-gl-js@440bc02
@ansis This doesn't work very well on device at the moment. It seems to stop loading tiles after a few gestures. |
@jfirebaugh I just pushed 1f5fb1d which I think should fix that |
Yep, feels good now! |
Same here. 👍 @ansis |
A couple things should be reviewed:
|
1.) Is the following scenario handled? a. worker starts doing replacement. This will work in most cases because TileCache will hold a shared_ptr to VectorTileData. However this needs to work even when TileCache size is zero. 2.) Also does it make sense to do some testing with TileCache size as zero? Tile Cache may hide some bugs because it holds a shared_ptr to TileData. |
thanks for the suggestions @mb12 |
So far so good with visual inspection. |
I don't see any glaring issues, but it's impossible to say much about thread safety conclusively, given the current structure. The TileData class hierarchy and worker code needs an overhaul to cleanly separate data on the worker thread from data on the map thread. |
Style&, | ||
GlyphAtlas&, | ||
GlyphStore&, | ||
SpriteAtlas&, | ||
util::ptr<Sprite>, | ||
const SourceInfo&); | ||
const SourceInfo&, | ||
float, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name parameters when it's not clear from their type?
and name parameters when it's not clear from their type
Conflicts: src/mbgl/renderer/painter_fill.cpp
@ansis Does redoPlacement need to be called at higher zoom levels? Specifically when (map's current zoom > SourceInfo.maxzoom + 1). Or is this handled in some other way to ensure good symbol density at higher zoom levels? (CollisionTileData.maxScale is const 2.0) |
@mb12 this is handled in some other way. mostly by 1e044a1. For zoom levels > maxzoom, tiles from the maximum zoom level are reparsed completely. Layout properties can be functions and in order for these functions to work it needs to reparse those layers at every zoom level. It reparses entire tiles instead of only layers that need it because that was easier to implement. |
this ports a bunch of stuff from -js:
This is finally close to merging. Sorry about the amount of changes in one pull request.
TODO:
I haven't noticed any stability problems but a lot has changed so this will probably introduce new bugs.