-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
c08fed4
to
6b922ca
Compare
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.
This looks good to me from the symbol side of things but it might be good to get some extra eyes on the c++ side?
6b922ca
to
11b554f
Compare
f57fe9b
to
f7ad039
Compare
- Symbol querying is now global instead of per-tile - Symbols that bleed over tile boundaries no longer missed in queries - Symbol results now sorted based on rendering order (ie overlapping symbols change their sort order when a bearing change causes their render order to change) - Placement::retainedQueryData now responsible for maintaining symbol querying data for buckets that may no longer be in the TilePyramid.
- Pulls over an update to line.vertex.glsl (looks like a no-op?) - Add test ignores for collator, is-supported-script, line-gradient - Exclude collator, is-supported-script, line-gradient from code generation.
46edc83
to
44b731d
Compare
src/mbgl/text/placement.cpp
Outdated
continue; | ||
} | ||
|
||
auto bucket = renderTile.tile.getBucket(*symbolLayer.baseImpl); | ||
GeometryTile& geometryTile = static_cast<GeometryTile&>(renderTile.tile); |
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.
Instead of doubling up on the dyanmic_cast
and static_cast
, how about using an assert(dynamic_cast<GeometryTile*>(&renderTile.tile)
. Aren't symbol layers expected to always have a geometry tile?
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.
Yeah, that sounds reasonable -- we're already doing the same thing in RenderSymbolLayer
.
src/mbgl/text/placement.cpp
Outdated
@@ -305,6 +314,9 @@ void Placement::updateBucketOpacities(SymbolBucket& bucket, std::set<uint32_t>& | |||
|
|||
bucket.updateOpacity(); | |||
bucket.sortFeatures(state.getAngle()); | |||
if (retainedQueryData.find(bucket.bucketInstanceId) != retainedQueryData.end()) { |
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.
Duplicate calls to find
. Pull out of the if condition.
- assert symbol layer tiles must be geometry tiles, instead of dynamically checking - re-use retainedBucketQuery iterator instead of calling find twice.
Fix for #11679.
This is a pretty direct port of the GL JS functionality. Things I'm a little uncomfortable with:
IndexedSubfeature
s we're doing, especially since they contain (hopefully short/fixed length) strings. I don't have a reason to think this is a performance hotspot, but it looks awkward.shared_ptr
-style ownership feels a little hard-to-audit (although it's the same as the javascript behavior, C++ just calls more attention to it).The fix is not as critical for native because native never had an "incremental placement", but this still fixes (1) querying near tile boundaries, and (2) result sort order for symbol buckets that have been re-sorted after generation. It's also nice that it gets rid of the
commitFeatureIndexes
pathway./cc @ansis @jfirebaugh