Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
cf3148f
Prepare for viewport-collision work: remove "straight" option for lin…
ChrisLoer Oct 2, 2017
1f979a7
Port viewport-collision changes to symbol_projection.cpp:
ChrisLoer Oct 2, 2017
999a07e
Remove FrameHistory. This will disable zoom-based collisions until fo…
ChrisLoer Oct 2, 2017
ee43106
Take FrameHistory out of core-files.
ChrisLoer Oct 2, 2017
0243010
add SymbolOpacityIndex [skip ci]
ansis Oct 2, 2017
fc49bc6
Initial implementation of "PlacementState": intended to be used by re…
ChrisLoer Oct 2, 2017
1b8ec34
Start implementing `CollisionIndex`, the global/viewport-based replac…
ChrisLoer Oct 4, 2017
dddc876
CollisionIndex initial implementation of line labels.
ChrisLoer Oct 5, 2017
5b41651
Initial implementation: add support for circle geometries to GridIndex.
ChrisLoer Oct 23, 2017
b7d0916
Fix annotation_tile.test (CollisionFeatures don't have an "AlignmentT…
ChrisLoer Oct 23, 2017
ce155b7
Add basic unit test for GridIndex.
ChrisLoer Oct 23, 2017
bcf23ae
update shaders and create symbol opacity buffer
ansis Oct 4, 2017
8f0fa38
start running new placement [skip ci]
ansis Oct 5, 2017
0f5f50f
Starting implementation of debug collision boxes.
ChrisLoer Oct 24, 2017
5dac77a
use the values in the collisionbox opacity buffer [skip ci]
ansis Oct 25, 2017
698b6e5
Hook up placement updates for collision boxes.
ChrisLoer Oct 25, 2017
f2845dc
Move CollisionIndex to use GridIndex instead of boost::rtree.
ChrisLoer Oct 25, 2017
7701de4
Initial implementation of debug collision circles
ChrisLoer Oct 25, 2017
f680559
Fix segment overflow bug for collision circles.
ChrisLoer Oct 25, 2017
fb60804
implement fading within tiles [skip ci]
ansis Oct 25, 2017
33b5a84
add a couple of assertions [skip ci]
ansis Oct 25, 2017
592071c
fix collision box opacity [skip ci]
ansis Oct 25, 2017
17115cc
fix incorrectly hidden symbols
ansis Oct 25, 2017
5005ca5
switch `float targetOpacity` to `bool placed`
ansis Oct 26, 2017
edfd79e
keep rendering until labels fade in [skip ci]
ansis Oct 26, 2017
27fb875
remove placedText and placedIcon from SymbolInstance
ansis Oct 26, 2017
1daba1c
Switch GridIndex to use float coordinates instead of int16s: fast way…
ChrisLoer Oct 26, 2017
f6ca0de
GridIndex support for queries fully containing or fully outside of grid
ChrisLoer Oct 26, 2017
0be88ed
Flip line label collisions from broken to not broken.
ChrisLoer Oct 26, 2017
1887196
upload symbol opacity buffers in main upload pass [skip ci]
ansis Oct 26, 2017
27ec6fd
Stop doing collision detection in background.
ChrisLoer Oct 26, 2017
353b3fb
Oops, got the index length wrong for circle debug boxes.
ChrisLoer Oct 26, 2017
304d8b3
Hook up tile distance calculation.
ChrisLoer Oct 26, 2017
5467ba4
Don't insert "unused" collision circles into the grid, it slows every…
ChrisLoer Oct 26, 2017
4531f34
Hook up "showCollisionBoxes" logic where "setPlacementConfig" logic u…
ChrisLoer Oct 26, 2017
a865929
Short circuit line label rendering for labels that are fully faded.
ChrisLoer Oct 26, 2017
321c0b8
Make CollisionIndex's GridIndex large enough to include the padding a…
ChrisLoer Oct 26, 2017
b346365
Make sure to mark symbols as collided if they don't fit on their line…
ChrisLoer Oct 26, 2017
2fd2c2d
fix flickering [skip ci]
ansis Oct 27, 2017
7d41c02
fix collisions in overscaled tiles [skip ci]
ansis Oct 27, 2017
2d78e61
Re-enable vertical glyph support.
ChrisLoer Oct 27, 2017
29025e7
Store tile id in indexedsubfeature
ChrisLoer Oct 27, 2017
5278667
First implementation of queryRenderedSymbols
ChrisLoer Oct 28, 2017
e82e817
Oops.
ChrisLoer Oct 28, 2017
5fc7d4a
Store sourceID in IndexedSubfeature so that queryRenderedSymbols can …
ChrisLoer Oct 30, 2017
d2148bd
Switch queryRenderedSymbols to use canonical tile IDs
ChrisLoer Oct 30, 2017
3fe147c
Starting on sorting.
ChrisLoer Oct 30, 2017
b677ba3
Don't do fade animations in MapMode::Still
ChrisLoer Oct 31, 2017
542b45d
Disable tile clipping for symbols.
ChrisLoer Oct 31, 2017
9fa0fe7
Make sure to sort all symbol buckets the first time we get them ready…
ChrisLoer Oct 31, 2017
fd606bb
Fix "vertexStartIndex" calculation for text symbols.
ChrisLoer Oct 31, 2017
56c34e6
GridIndex: add separate "query" method that doesn't return bounding b…
ChrisLoer Oct 31, 2017
9e19cbb
Update Map.Offline unit test with new image fixture reflecting new co…
ChrisLoer Oct 31, 2017
9841621
Update unit test stubs to match new collision code.
ChrisLoer Oct 31, 2017
c95e689
Add "icon-allow-overlap" to query_style.json in order to preserve tes…
ChrisLoer Oct 31, 2017
d93b292
Changes for circle-ci clang-tidy.
ChrisLoer Oct 31, 2017
af55c99
Compiler appeasement.
ChrisLoer Nov 1, 2017
35a79aa
More compiler appeasement.
ChrisLoer Nov 1, 2017
6c575d0
Apparently parameter names can collide with method names for gcc?
ChrisLoer Nov 1, 2017
486902b
fade symbols across tiles (#10361)
ansis Nov 2, 2017
5bc9844
Port GL JS logic for generating extra collision circles in overscaled…
ChrisLoer Nov 2, 2017
8d609ed
Fix infinite loop when minZoom == 0.
ChrisLoer Nov 2, 2017
13871d4
Fix "scale" and "textPixelRatio" calculations -- both of them need to…
ChrisLoer Nov 3, 2017
ec20aac
Fix collision box dynamic updating logic to match tile boundaries use…
ChrisLoer Nov 2, 2017
3c09aba
Remove addressed TODOs
ChrisLoer Nov 2, 2017
22378c4
throttle placement
ansis Nov 2, 2017
e0daf69
drop symbols outside of tile boundaries earlier
ansis Nov 3, 2017
02d8bb6
only render one version of each symbol
ansis Nov 3, 2017
b28fc5d
use floats for shaping to fix render tests (#10389)
ansis Nov 6, 2017
3b30090
Switch to "one-phase" tile loading:
ChrisLoer Nov 3, 2017
bc4f35c
Rename CollisionBoxOpacityAttributes -> CollisionBoxDynamicAttributes.
ChrisLoer Nov 6, 2017
fea1d05
Fix unit tests:
ChrisLoer Nov 6, 2017
d80bae7
update mapbox-gl-js to fix symbol-spacing/line-close
ansis Nov 6, 2017
250f3db
Pull in latest tests from mapbox-gl-js, update ignores.
ChrisLoer Nov 7, 2017
36c5e58
Port fix of gl-js issue #5546 (correct vertical orientation for singl…
ChrisLoer Nov 7, 2017
ec54aa1
Fix sanitizer issue caused by adding a duration to TimePoint::max() i…
ChrisLoer Nov 7, 2017
b309465
Appease clang-tidy.
ChrisLoer Nov 7, 2017
6104d0f
replace placedTextIndices vector with two members
ansis Nov 7, 2017
2a814a0
move SymbolInstances to bucket instead of copying
ansis Nov 7, 2017
c84656c
remove unused
ansis Nov 7, 2017
1d6789f
I think being public is ok here
ansis Nov 7, 2017
39b9bd4
not here
ansis Nov 7, 2017
c9bc719
clear() returns the moved vector to a known state
ansis Nov 7, 2017
d4c8395
I checked and this seems right [skip ci]
ansis Nov 7, 2017
0bbc80f
Remove unused `SymbolPlacementType` for icons.
ChrisLoer Nov 7, 2017
99606e6
Remove GridIndex TODOs.
ChrisLoer Nov 7, 2017
f363d1c
Give up on idea of instantiating a different version of GridIndex for…
ChrisLoer Nov 7, 2017
777f579
Fix unit tests that use SymbolBucket.
ChrisLoer Nov 7, 2017
8a0486e
Remove annotation_tile test. This test exercised the pathway that tra…
ChrisLoer Nov 7, 2017
b3dd0fe
TODO -> explanation for why we calculate tile distances the way we do.
ChrisLoer Nov 7, 2017
75a70cf
Settle on using 'float' as unit for CollisionIndex.
ChrisLoer Nov 7, 2017
b2b5c3e
Use UnwrappedTileID instead of CanonicalTileID as input to queryRende…
ChrisLoer Nov 7, 2017
bac8368
Add ignores for two relatively minor test failures.
ChrisLoer Nov 8, 2017
fccd78f
Remove ignores for issues that I'm pretty confident are fixed by view…
ChrisLoer Nov 8, 2017
6d6d1fc
Fix clang-tidy error.
ChrisLoer Nov 8, 2017
90f6a23
'make test-node-recycle-map' fails if the cross tile symbol index is …
ChrisLoer Nov 8, 2017
0f4eed2
Ignores for the remaining tests that aren't failing locally but still…
ChrisLoer Nov 8, 2017
7fceec2
Unbind VAO before binding a GL_ELEMENT_ARRAY_BUFFER.
ChrisLoer Nov 8, 2017
e6f6013
clean
ansis Nov 9, 2017
d59adcb
Remove speculative perf TODO -- this doesn't show up as an obvious ho…
ChrisLoer Nov 9, 2017
8033911
Move Placement's CollisionIndex behind a const getter, to ensure it's…
ChrisLoer Nov 9, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions cmake/core-files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ set(MBGL_CORE_FILES
src/mbgl/renderer/cross_faded_property_evaluator.cpp
src/mbgl/renderer/cross_faded_property_evaluator.hpp
src/mbgl/renderer/data_driven_property_evaluator.hpp
src/mbgl/renderer/frame_history.cpp
src/mbgl/renderer/frame_history.hpp
src/mbgl/renderer/group_by_layout.cpp
src/mbgl/renderer/group_by_layout.hpp
src/mbgl/renderer/image_atlas.cpp
Expand Down Expand Up @@ -257,6 +255,8 @@ set(MBGL_CORE_FILES
src/mbgl/shaders/circle.hpp
src/mbgl/shaders/collision_box.cpp
src/mbgl/shaders/collision_box.hpp
src/mbgl/shaders/collision_circle.cpp
src/mbgl/shaders/collision_circle.hpp
src/mbgl/shaders/debug.cpp
src/mbgl/shaders/debug.hpp
src/mbgl/shaders/extrusion_texture.cpp
Expand Down Expand Up @@ -477,8 +477,10 @@ set(MBGL_CORE_FILES
src/mbgl/text/check_max_angle.hpp
src/mbgl/text/collision_feature.cpp
src/mbgl/text/collision_feature.hpp
src/mbgl/text/collision_tile.cpp
src/mbgl/text/collision_tile.hpp
src/mbgl/text/collision_index.cpp
src/mbgl/text/collision_index.hpp
src/mbgl/text/cross_tile_symbol_index.cpp
src/mbgl/text/cross_tile_symbol_index.hpp
src/mbgl/text/get_anchors.cpp
src/mbgl/text/get_anchors.hpp
src/mbgl/text/glyph.cpp
Expand All @@ -491,7 +493,8 @@ set(MBGL_CORE_FILES
src/mbgl/text/glyph_pbf.cpp
src/mbgl/text/glyph_pbf.hpp
src/mbgl/text/glyph_range.hpp
src/mbgl/text/placement_config.hpp
src/mbgl/text/placement.cpp
src/mbgl/text/placement.hpp
src/mbgl/text/quads.cpp
src/mbgl/text/quads.hpp
src/mbgl/text/shaping.cpp
Expand Down
2 changes: 1 addition & 1 deletion cmake/test-files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ set(MBGL_TEST_FILES
test/text/quads.test.cpp

# tile
test/tile/annotation_tile.test.cpp
test/tile/geojson_tile.test.cpp
test/tile/geometry_tile_data.test.cpp
test/tile/raster_tile.test.cpp
Expand All @@ -123,6 +122,7 @@ set(MBGL_TEST_FILES
test/util/async_task.test.cpp
test/util/dtoa.test.cpp
test/util/geo.test.cpp
test/util/grid_index.test.cpp
test/util/http_timeout.test.cpp
test/util/image.test.cpp
test/util/mapbox.test.cpp
Expand Down
2 changes: 1 addition & 1 deletion mapbox-gl-js
Submodule mapbox-gl-js updated 564 files
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"license": "BSD-2-Clause",
"dependencies": {
"nan": "^2.4.0",
"node-pre-gyp": "^0.6.37",
"node-pre-gyp": "^0.6.38",
"npm-run-all": "^4.0.2"
},
"devDependencies": {
Expand Down
59 changes: 43 additions & 16 deletions platform/node/test/ignores.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"query-tests/circle-stroke-width/inside": "https://github.com/mapbox/mapbox-gl-native/issues/10307",
"query-tests/geometry/multilinestring": "needs investigation",
"query-tests/geometry/multipolygon": "needs investigation",
"query-tests/geometry/polygon": "needs investigation",
"query-tests/regressions/mapbox-gl-js#3534": "https://github.com/mapbox/mapbox-gl-native/issues/8193",
"query-tests/regressions/mapbox-gl-js#4417": "https://github.com/mapbox/mapbox-gl-native/issues/8007",
"query-tests/symbol-features-in/pitched-screen": "https://github.com/mapbox/mapbox-gl-native/issues/6817",
"query-tests/symbol-features-in/tilted-inside": "https://github.com/mapbox/mapbox-gl-native/issues/5056",
"query-tests/symbol-features-in/tilted-outside": "https://github.com/mapbox/mapbox-gl-native/issues/9435",
"query-tests/symbol/panned-after-insert": "https://github.com/mapbox/mapbox-gl-native/issues/10408",
"query-tests/symbol/rotated-after-insert": "https://github.com/mapbox/mapbox-gl-native/issues/10408",
"query-tests/world-wrapping/box": "skip - needs issue",
"query-tests/world-wrapping/point": "skip - needs issue",
"render-tests/debug/collision-overscaled": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
Expand All @@ -16,7 +15,6 @@
"render-tests/debug/tile-overscaled": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
"render-tests/debug/tile": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
"render-tests/extent/1024-circle": "needs investigation",
"render-tests/extent/1024-symbol": "needs investigation",
"render-tests/fill-extrusion-pattern/@2x": "https://github.com/mapbox/mapbox-gl-js/issues/3327",
"render-tests/fill-extrusion-pattern/function-2": "https://github.com/mapbox/mapbox-gl-js/issues/3327",
"render-tests/fill-extrusion-pattern/function": "https://github.com/mapbox/mapbox-gl-js/issues/3327",
Expand All @@ -27,33 +25,58 @@
"render-tests/geojson/inline-polygon-symbol": "behavior needs reconciliation with gl-js",
"render-tests/icon-size/composite-function-high-base-plain": "https://github.com/mapbox/mapbox-gl-native/issues/8654",
"render-tests/icon-size/composite-function-high-base-sdf": "https://github.com/mapbox/mapbox-gl-native/issues/8654",
"render-tests/icon-text-fit/both-padding": "https://github.com/mapbox/mapbox-gl-native/issues/5602",
"render-tests/icon-text-fit/both": "https://github.com/mapbox/mapbox-gl-native/issues/5602",
"render-tests/icon-text-fit/height": "https://github.com/mapbox/mapbox-gl-native/issues/5602",
"render-tests/icon-text-fit/width-padding": "https://github.com/mapbox/mapbox-gl-native/issues/5602",
"render-tests/icon-text-fit/width": "https://github.com/mapbox/mapbox-gl-native/issues/5602",
"render-tests/line-width/property-function": "https://github.com/mapbox/mapbox-gl-js/issues/3682#issuecomment-264348200",
"render-tests/line-join/property-function": "https://github.com/mapbox/mapbox-gl-js/pull/5020",
"render-tests/line-join/property-function-dasharray": "https://github.com/mapbox/mapbox-gl-js/pull/5020",
"render-tests/line-opacity/step-curve": "https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/mixed-zoom/z10-z11": "https://github.com/mapbox/mapbox-gl-native/issues/10397",
"render-tests/raster-masking/overlapping-zoom": "https://github.com/mapbox/mapbox-gl-native/issues/10195",
"render-tests/regressions/mapbox-gl-js#2305": "https://github.com/mapbox/mapbox-gl-native/issues/6927",
"render-tests/regressions/mapbox-gl-js#3682": "https://github.com/mapbox/mapbox-gl-js/issues/3682",
"render-tests/regressions/mapbox-gl-js#5370": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/regressions/mapbox-gl-js#5576": "https://github.com/mapbox/mapbox-gl-native/issues/10396",
"render-tests/regressions/mapbox-gl-native#7357": "https://github.com/mapbox/mapbox-gl-native/issues/7357",
"render-tests/runtime-styling/image-add-sdf": "https://github.com/mapbox/mapbox-gl-native/issues/9847",
"render-tests/runtime-styling/paint-property-fill-flat-to-extrude": "https://github.com/mapbox/mapbox-gl-native/issues/6745",
"render-tests/runtime-styling/set-style-paint-property-fill-flat-to-extrude": "https://github.com/mapbox/mapbox-gl-native/issues/6745",
"render-tests/symbol-placement/line": "needs issue",
"render-tests/runtime-styling/layout-property-default-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/layout-property-default-to-zoom-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/layout-property-literal-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/layout-property-literal-to-zoom-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/layout-property-property-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/layout-property-property-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/layout-property-zoom-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/layout-property-zoom-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-default-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-default-to-zoom-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-literal-to-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-literal-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-property-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-property-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-zoom-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/paint-property-zoom-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-default-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-default-to-zoom-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-literal-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-literal-to-zoom-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-property-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-property-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-layout-property-zoom-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-default-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-default-to-zoom-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-literal-to-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-literal-to-property-expression": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-property-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-property-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-default": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/runtime-styling/set-style-paint-property-zoom-expression-to-literal": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/symbol-visibility/visible": "https://github.com/mapbox/mapbox-gl-native/issues/10409",
"render-tests/text-font/camera-function": "https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/text-pitch-alignment/auto-text-rotation-alignment-map": "https://github.com/mapbox/mapbox-gl-native/issues/9732",
"render-tests/text-pitch-alignment/auto-text-rotation-alignment-viewport": "https://github.com/mapbox/mapbox-gl-native/issues/9732",
"render-tests/text-pitch-alignment/map-text-rotation-alignment-map": "https://github.com/mapbox/mapbox-gl-native/issues/9732",
"render-tests/text-pitch-alignment/map-text-rotation-alignment-viewport": "https://github.com/mapbox/mapbox-gl-native/issues/9732",
"render-tests/text-pitch-alignment/viewport-overzoomed": "https://github.com/mapbox/mapbox-gl-js/issues/5095",
"render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph": "https://github.com/mapbox/mapbox-gl-js/issues/5095",
"render-tests/text-pitch-alignment/viewport-text-rotation-alignment-map": "https://github.com/mapbox/mapbox-gl-native/issues/9732",
"render-tests/text-pitch-alignment/viewport-text-rotation-alignment-viewport": "https://github.com/mapbox/mapbox-gl-native/issues/9732",
"render-tests/text-pitch-scaling/line-half": "https://github.com/mapbox/mapbox-gl-native/issues/9732",
"render-tests/text-size/composite-expression": "https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/video/default": "skip - https://github.com/mapbox/mapbox-gl-native/issues/601",
Expand All @@ -73,5 +96,9 @@
"render-tests/heatmap-radius/pitch30": "https://github.com/mapbox/mapbox-gl-native/issues/10146",
"render-tests/heatmap-weight/default": "https://github.com/mapbox/mapbox-gl-native/issues/10146",
"render-tests/heatmap-weight/identity-property-function": "https://github.com/mapbox/mapbox-gl-native/issues/10146",
"render-tests/heatmap-weight/literal": "https://github.com/mapbox/mapbox-gl-native/issues/10146"
"render-tests/heatmap-weight/literal": "https://github.com/mapbox/mapbox-gl-native/issues/10146",
"render-tests/debug/collision-lines-pitched": "https://github.com/mapbox/mapbox-gl-native/issues/10412",
"render-tests/debug/collision-lines": "https://github.com/mapbox/mapbox-gl-native/issues/10412",
"render-tests/text-pitch-alignment/viewport-overzoomed-single-glyph": "https://github.com/mapbox/mapbox-gl-native/issues/10412",
"render-tests/text-pitch-alignment/viewport-text-depthtest": "https://github.com/mapbox/mapbox-gl-native/issues/10412"
}
5 changes: 3 additions & 2 deletions src/mbgl/annotation/render_annotation_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ std::unordered_map<std::string, std::vector<Feature>>
RenderAnnotationSource::queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
const std::vector<const RenderLayer*>& layers,
const RenderedQueryOptions& options) const {
return tilePyramid.queryRenderedFeatures(geometry, transformState, layers, options);
const RenderedQueryOptions& options,
const CollisionIndex& collisionIndex) const {
return tilePyramid.queryRenderedFeatures(geometry, transformState, layers, options, collisionIndex);
}

std::vector<Feature> RenderAnnotationSource::querySourceFeatures(const SourceQueryOptions&) const {
Expand Down
3 changes: 2 additions & 1 deletion src/mbgl/annotation/render_annotation_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class RenderAnnotationSource : public RenderSource {
queryRenderedFeatures(const ScreenLineString& geometry,
const TransformState& transformState,
const std::vector<const RenderLayer*>& layers,
const RenderedQueryOptions& options) const final;
const RenderedQueryOptions& options,
const CollisionIndex& collisionIndex) const final;

std::vector<Feature>
querySourceFeatures(const SourceQueryOptions&) const final;
Expand Down
28 changes: 13 additions & 15 deletions src/mbgl/geometry/feature_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <mbgl/renderer/render_layer.hpp>
#include <mbgl/renderer/query.hpp>
#include <mbgl/renderer/layers/render_symbol_layer.hpp>
#include <mbgl/text/collision_tile.hpp>
#include <mbgl/text/collision_index.hpp>
#include <mbgl/util/constants.hpp>
#include <mbgl/util/math.hpp>
#include <mbgl/math/minmax.hpp>
Expand All @@ -18,16 +18,17 @@
namespace mbgl {

FeatureIndex::FeatureIndex()
: grid(util::EXTENT, 16, 0) {
: grid(util::EXTENT, util::EXTENT, util::EXTENT >> 5) {
}

void FeatureIndex::insert(const GeometryCollection& geometries,
std::size_t index,
const std::string& sourceLayerName,
const std::string& bucketName) {
for (const auto& ring : geometries) {
grid.insert(IndexedSubfeature { index, sourceLayerName, bucketName, sortIndex++ },
mapbox::geometry::envelope(ring));
auto envelope = mapbox::geometry::envelope(ring);
grid.insert(IndexedSubfeature(index, sourceLayerName, bucketName, sortIndex++),
{convertPoint<float>(envelope.min), convertPoint<float>(envelope.max)});
}
}

Expand All @@ -47,9 +48,10 @@ void FeatureIndex::query(
const double scale,
const RenderedQueryOptions& queryOptions,
const GeometryTileData& geometryTileData,
const CanonicalTileID& tileID,
const UnwrappedTileID& tileID,
const std::string& sourceID,
const std::vector<const RenderLayer*>& layers,
const CollisionTile* collisionTile,
const CollisionIndex& collisionIndex,
const float additionalQueryRadius) const {

// Determine query radius
Expand All @@ -58,7 +60,8 @@ void FeatureIndex::query(

// Query the grid index
mapbox::geometry::box<int16_t> box = mapbox::geometry::envelope(queryGeometry);
std::vector<IndexedSubfeature> features = grid.query({ box.min - additionalRadius, box.max + additionalRadius });
std::vector<IndexedSubfeature> features = grid.query({ convertPoint<float>(box.min - additionalRadius),
convertPoint<float>(box.max + additionalRadius) });


std::sort(features.begin(), features.end(), topDown);
Expand All @@ -69,18 +72,13 @@ void FeatureIndex::query(
if (indexedFeature.sortIndex == previousSortIndex) continue;
previousSortIndex = indexedFeature.sortIndex;

addFeature(result, indexedFeature, queryGeometry, queryOptions, geometryTileData, tileID, layers, bearing, pixelsToTileUnits);
addFeature(result, indexedFeature, queryGeometry, queryOptions, geometryTileData, tileID.canonical, layers, bearing, pixelsToTileUnits);
}

// Query symbol features, if they've been placed.
if (!collisionTile) {
return;
}

std::vector<IndexedSubfeature> symbolFeatures = collisionTile->queryRenderedSymbols(queryGeometry, scale);
std::vector<IndexedSubfeature> symbolFeatures = collisionIndex.queryRenderedSymbols(queryGeometry, tileID, sourceID);
std::sort(symbolFeatures.begin(), symbolFeatures.end(), topDownSymbols);
for (const auto& symbolFeature : symbolFeatures) {
addFeature(result, symbolFeature, queryGeometry, queryOptions, geometryTileData, tileID, layers, bearing, pixelsToTileUnits);
addFeature(result, symbolFeature, queryGeometry, queryOptions, geometryTileData, tileID.canonical, layers, bearing, pixelsToTileUnits);
}
}

Expand Down
Loading