Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Global/Viewport Collision Detection #10436

Merged
merged 21 commits into from
Nov 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6c2bdad
[core] Add CrossTileSymbolIndex.
ChrisLoer Nov 9, 2017
f1830ad
[core] Add circle geometries to GridIndex.
ChrisLoer Nov 9, 2017
6a27228
[core] Add Placement class.
ChrisLoer Nov 9, 2017
2f0f9c8
[core] Add global CollisionIndex to replace CollisionTile.
ChrisLoer Nov 9, 2017
0e5dd48
[core] Enable dynamic updates of index buffers.
ChrisLoer Nov 9, 2017
6f2b057
[core] Switch from background to foreground placement
ChrisLoer Nov 9, 2017
e00f68a
[core] Update queryRenderedFeatures to use global CollisionIndex.
ChrisLoer Nov 9, 2017
684254d
[core] Update shaders/tests from GL JS.
ChrisLoer Nov 9, 2017
735f2e6
[core] Use floats instead of ints for Shaping.
ChrisLoer Nov 9, 2017
90fc4c1
[core] Remove dead code
ChrisLoer Nov 9, 2017
eea18bb
[core] Update unit tests for viewport collision.
ChrisLoer Nov 9, 2017
44bd873
[core] Removed ignores for fixed issues.
ChrisLoer Nov 9, 2017
7810b4b
[core] Added ignores for two query tests that return the same set of …
ChrisLoer Nov 9, 2017
3aab596
[core] Cleanup in response to review comments
ChrisLoer Nov 10, 2017
cb36bc1
[core] Split MapMode::Still into Static and Tile
ansis Nov 10, 2017
6505b20
[core] Skip fade animation for placed symbols that are currently offs…
ChrisLoer Nov 11, 2017
2519b29
[core] Sort child symbol tiles before parent symbol tiles
ansis Nov 13, 2017
af903a3
[core] Remove ignores for passing tests.
ChrisLoer Nov 13, 2017
64b1668
[core] Cleanup in response to review comments.
ChrisLoer Nov 13, 2017
b2b91bf
[core] Add unit test for CrossTileSymbolIndex
ansis Nov 15, 2017
40e7356
[core] Symbol cross-fading.
ChrisLoer Nov 14, 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
2 changes: 1 addition & 1 deletion benchmark/api/query.benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class QueryBenchmark {
DefaultFileSource fileSource{ "benchmark/fixtures/api/cache.db", "." };
ThreadPool threadPool{ 4 };
HeadlessFrontend frontend { { 1000, 1000 }, 1, fileSource, threadPool };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, fileSource, threadPool, MapMode::Still };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, fileSource, threadPool, MapMode::Static};
ScreenBox box{{ 0, 0 }, { 1000, 1000 }};
};

Expand Down
6 changes: 3 additions & 3 deletions benchmark/api/render.benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void prepare(Map& map, optional<std::string> json = {}) {
static void API_renderStill_reuse_map(::benchmark::State& state) {
RenderBenchmark bench;
HeadlessFrontend frontend { { 1000, 1000 }, 1, bench.fileSource, bench.threadPool };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Static};
prepare(map);

while (state.KeepRunning()) {
Expand All @@ -52,7 +52,7 @@ static void API_renderStill_reuse_map(::benchmark::State& state) {
static void API_renderStill_reuse_map_switch_styles(::benchmark::State& state) {
RenderBenchmark bench;
HeadlessFrontend frontend { { 1000, 1000 }, 1, bench.fileSource, bench.threadPool };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Static};

while (state.KeepRunning()) {
prepare(map, { "{}" });
Expand All @@ -67,7 +67,7 @@ static void API_renderStill_recreate_map(::benchmark::State& state) {

while (state.KeepRunning()) {
HeadlessFrontend frontend { { 1000, 1000 }, 1, bench.fileSource, bench.threadPool };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Still };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), 1, bench.fileSource, bench.threadPool, MapMode::Static};
prepare(map);
frontend.render(map);
}
Expand Down
2 changes: 1 addition & 1 deletion bin/render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int main(int argc, char *argv[]) {

ThreadPool threadPool(4);
HeadlessFrontend frontend({ width, height }, pixelRatio, fileSource, threadPool);
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource, threadPool, MapMode::Still);
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource, threadPool, MapMode::Static);

if (style_path.find("://") == std::string::npos) {
style_path = std::string("file://") + style_path;
Expand Down
13 changes: 8 additions & 5 deletions cmake/core-files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,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 @@ -258,6 +256,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 @@ -529,8 +529,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 @@ -543,7 +545,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
5 changes: 3 additions & 2 deletions cmake/test-files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ set(MBGL_TEST_FILES

# gl
test/gl/bucket.test.cpp
test/gl/object.test.cpp
test/gl/context.test.cpp
test/gl/object.test.cpp

# include/mbgl
test/include/mbgl/test.hpp
Expand Down Expand Up @@ -111,12 +111,12 @@ set(MBGL_TEST_FILES
test/style/style_parser.test.cpp

# text
test/text/cross_tile_symbol_index.test.cpp
test/text/glyph_loader.test.cpp
test/text/glyph_pbf.test.cpp
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 @@ -128,6 +128,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
3 changes: 2 additions & 1 deletion include/mbgl/map/mode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ using EnumType = uint32_t;

enum class MapMode : EnumType {
Continuous, // continually updating map
Still, // a once-off still image
Static, // a once-off still image of an arbitrary viewport
Tile // a once-off still image of a single tile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting idea!

};

// We can choose to constrain the map both horizontally or vertically, or only
Expand Down
6 changes: 3 additions & 3 deletions include/mbgl/tile/tile_id.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class CanonicalTileID {
CanonicalTileID scaledTo(uint8_t z) const;
std::array<CanonicalTileID, 4> children() const;

const uint8_t z;
const uint32_t x;
const uint32_t y;
uint8_t z;
uint32_t x;
uint32_t y;
};

::std::ostream& operator<<(::std::ostream& os, const CanonicalTileID& rhs);
Expand Down
2 changes: 1 addition & 1 deletion mapbox-gl-js
Submodule mapbox-gl-js updated 64 files
+5 −0 CHANGELOG.md
+4 −4 README.md
+9 −9 bench/benchmarks/expressions.js
+3 −5 build/generate-flow-typed-style-spec.js
+11 −10 docs/pages/example/heatmap-layer.html
+3 −5 flow-typed/style-spec.js
+1 −1 package.json
+1 −1 src/geo/lng_lat.js
+16 −9 src/gl/index_buffer.js
+1 −0 src/render/glyph_manager.js
+1 −0 src/render/image_manager.js
+1 −0 src/source/geojson_source.js
+1 −0 src/source/geojson_worker_source.js
+1 −0 src/source/image_source.js
+1 −0 src/source/load_tilejson.js
+1 −0 src/source/raster_tile_source.js
+1 −0 src/source/source.js
+1 −0 src/source/source_cache.js
+1 −0 src/source/vector_tile_source.js
+1 −0 src/source/vector_tile_worker_source.js
+3 −2 src/source/worker.js
+6 −15 src/source/worker_tile.js
+76 −95 src/style-spec/expression/index.js
+6 −5 src/style-spec/feature_filter/index.js
+1 −4 src/style-spec/function/convert.js
+5 −13 src/style-spec/function/index.js
+14 −13 src/style-spec/reference/v8.json
+7 −0 src/style-spec/style-spec.js
+23 −0 src/style-spec/util/result.js
+6 −5 src/style-spec/validate/validate_expression.js
+1 −1 src/style-spec/validate/validate_function.js
+3 −3 src/style/light.js
+1 −0 src/style/load_glyph_range.js
+1 −0 src/style/load_sprite.js
+3 −25 src/style/style.js
+22 −23 src/style/style_declaration.js
+8 −8 src/style/style_layer.js
+2 −2 src/style/style_layer/symbol_style_layer.js
+1 −11 src/style/style_layer_index.js
+1 −1 src/symbol/quads.js
+3 −3 src/symbol/symbol_size.js
+2 −2 src/types/callback.js
+1 −1 src/ui/camera.js
+4 −6 src/ui/map.js
+2 −0 src/util/ajax.js
+2 −0 src/util/util.js
+9 −7 test/expression.test.js
+3 −4 test/ignores.json
+ test/integration/render-tests/heatmap-color/function/expected.png
+0 −50 test/integration/render-tests/heatmap-color/function/style.json
+ test/integration/render-tests/map-mode/static/expected.png
+56 −0 test/integration/render-tests/map-mode/static/style.json
+ test/integration/render-tests/map-mode/tile/expected.png
+56 −0 test/integration/render-tests/map-mode/tile/style.json
+ test/integration/render-tests/regressions/mapbox-gl-js#5631/expected.png
+74 −0 test/integration/render-tests/regressions/mapbox-gl-js#5631/style.json
+ test/integration/render-tests/text-pitch-scaling/line-half/expected.png
+5 −0 test/unit/geo/lng_lat.test.js
+12 −12 test/unit/style-spec/expression.test.js
+17 −0 test/unit/style-spec/fixture/functions.input.json
+8 −0 test/unit/style-spec/fixture/functions.output.json
+7 −13 test/unit/style-spec/function.test.js
+8 −8 test/unit/style/style_declaration.test.js
+1 −1 test/unit/ui/camera.test.js
2 changes: 1 addition & 1 deletion platform/default/mbgl/map/map_snapshotter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ MapSnapshotter::Impl::Impl(FileSource& fileSource,
const optional<LatLngBounds> region,
const optional<std::string> programCacheDir)
: frontend(size, pixelRatio, fileSource, scheduler, programCacheDir)
, map(frontend, MapObserver::nullObserver(), size, pixelRatio, fileSource, scheduler, MapMode::Still) {
, map(frontend, MapObserver::nullObserver(), size, pixelRatio, fileSource, scheduler, MapMode::Static) {

map.getStyle().loadURL(styleURL);

Expand Down
3 changes: 3 additions & 0 deletions platform/node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# master
- The `Map` constructor now accepts a `mode` option which can be either `"static"` (default) or `"tile"`. It must be set to `"tile"` when rendering individual tiles in order for the symbols to match across tiles.

# 3.5.8 - October 19, 2017
- Fixes an issue that causes memory leaks when not deleting the frontend object
in NodeMap::release()
Expand Down
13 changes: 11 additions & 2 deletions platform/node/src/node_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ void NodeMap::cancel() {

frontend = std::make_unique<mbgl::HeadlessFrontend>(mbgl::Size{ 256, 256 }, pixelRatio, *this, threadpool);
map = std::make_unique<mbgl::Map>(*frontend, mapObserver, frontend->getSize(), pixelRatio,
*this, threadpool, mbgl::MapMode::Still);
*this, threadpool, mode);

// FIXME: Reload the style after recreating the map. We need to find
// a better way of canceling an ongoing rendering on the core level
Expand Down Expand Up @@ -1074,6 +1074,15 @@ NodeMap::NodeMap(v8::Local<v8::Object> options)
->NumberValue()
: 1.0;
}())
, mode([&] {
Nan::HandleScope scope;
if (Nan::Has(options, Nan::New("mode").ToLocalChecked()).FromJust() &&
std::string(*v8::String::Utf8Value(Nan::Get(options, Nan::New("mode").ToLocalChecked()).ToLocalChecked()->ToString())) == "tile") {
return mbgl::MapMode::Tile;
} else {
return mbgl::MapMode::Static;
}
}())
, mapObserver(NodeMapObserver())
, frontend(std::make_unique<mbgl::HeadlessFrontend>(mbgl::Size { 256, 256 }, pixelRatio, *this, threadpool))
, map(std::make_unique<mbgl::Map>(*frontend,
Expand All @@ -1082,7 +1091,7 @@ NodeMap::NodeMap(v8::Local<v8::Object> options)
pixelRatio,
*this,
threadpool,
mbgl::MapMode::Still)),
mode)),
async(new uv_async_t) {

async->data = this;
Expand Down
1 change: 1 addition & 0 deletions platform/node/src/node_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class NodeMap : public Nan::ObjectWrap,
std::unique_ptr<mbgl::AsyncRequest> request(const mbgl::Resource&, mbgl::FileSource::Callback);

const float pixelRatio;
mbgl::MapMode mode;
NodeThreadPool threadpool;
NodeMapObserver mapObserver;
std::unique_ptr<mbgl::HeadlessFrontend> frontend;
Expand Down
52 changes: 8 additions & 44 deletions platform/node/test/ignores.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,17 @@
"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/regressions/mapbox-gl-js#5554": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"query-tests/symbol/panned-after-insert": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"query-tests/symbol/rotated-after-insert": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"query-tests/symbol/rotated-inside": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"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": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
"render-tests/debug/collision-lines": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/debug/collision-lines-pitched": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/debug/collision-overscaled": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
"render-tests/debug/collision-pitched": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
"render-tests/debug/collision-pitched-wrapped": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
"render-tests/debug/collision-lines": "https://github.com/mapbox/mapbox-gl-native/issues/10412",
"render-tests/debug/collision-lines-pitched": "https://github.com/mapbox/mapbox-gl-native/issues/10412",
"render-tests/debug/collision-pitched-wrapped": "https://github.com/mapbox/mapbox-gl-native/issues/10412",
"render-tests/debug/tile": "https://github.com/mapbox/mapbox-gl-native/issues/3841",
"render-tests/debug/tile-overscaled": "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": "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",
Expand Down Expand Up @@ -53,47 +43,21 @@
"render-tests/heatmap-weight/literal": "https://github.com/mapbox/mapbox-gl-native/issues/10146",
"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": "https://github.com/mapbox/mapbox-gl-native/issues/5602",
"render-tests/icon-text-fit/both-padding": "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/placement-line": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/icon-text-fit/width": "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/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/line-width/property-function": "https://github.com/mapbox/mapbox-gl-js/issues/3682#issuecomment-264348200",
"render-tests/mixed-zoom/z10-z11": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"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#4647": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/regressions/mapbox-gl-js#5370": "skip - https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/regressions/mapbox-gl-js#5599": "https://github.com/mapbox/mapbox-gl-native/issues/10399",
"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-glyphs": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"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/symbol-placement/line-overscaled": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/symbol-placement/point": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/symbol-spacing/line-close": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/symbol-spacing/line-far": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/symbol-visibility/visible": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/text-font/camera-function": "https://github.com/mapbox/mapbox-gl-native/pull/9439",
"render-tests/text-font/chinese": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/symbol-placement/line-overscaled": "https://github.com/mapbox/mapbox-gl-js/issues/5654",
"render-tests/symbol-visibility/visible": "https://github.com/mapbox/mapbox-gl-native/issues/10409",
"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/text-tile-edge-clipping/default": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/text-visibility/visible": "https://github.com/mapbox/mapbox-gl-native/pull/10103",
"render-tests/video/default": "skip - https://github.com/mapbox/mapbox-gl-native/issues/601"
}
16 changes: 10 additions & 6 deletions platform/node/test/suite_implementation.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@ mbgl.on('message', function(msg) {
var maps = new Map();

module.exports = function (style, options, callback) {
var tileMode = options.mapMode === 'tile';
if (options.recycleMap) {
if (maps.has(options.pixelRatio)) {
var map = maps.get(options.pixelRatio);
var key = options.pixelRatio + '/' + tileMode;
if (maps.has(key)) {
var map = maps.get(key);
map.request = mapRequest;
} else {
maps.set(options.pixelRatio, new mbgl.Map({
maps.set(key, new mbgl.Map({
ratio: options.pixelRatio,
request: mapRequest
request: mapRequest,
mode: options.mapMode
}));
var map = maps.get(options.pixelRatio);
var map = maps.get(key);
}
} else {
var map = new mbgl.Map({
ratio: options.pixelRatio,
request: mapRequest
request: mapRequest,
mode: options.mapMode
});
}

Expand Down
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
Loading