summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/api/query.benchmark.cpp2
-rw-r--r--benchmark/api/render.benchmark.cpp6
-rw-r--r--bin/render.cpp2
-rw-r--r--include/mbgl/map/mode.hpp3
m---------mapbox-gl-js0
-rw-r--r--platform/default/mbgl/map/map_snapshotter.cpp2
-rw-r--r--platform/node/CHANGELOG.md3
-rw-r--r--platform/node/src/node_map.cpp13
-rw-r--r--platform/node/src/node_map.hpp1
-rw-r--r--platform/node/test/suite_implementation.js16
-rw-r--r--src/mbgl/layout/symbol_layout.cpp4
-rw-r--r--src/mbgl/map/map.cpp6
-rw-r--r--src/mbgl/renderer/buckets/circle_bucket.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_circle_layer.cpp2
-rw-r--r--src/mbgl/renderer/layers/render_symbol_layer.cpp7
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp14
-rw-r--r--src/mbgl/text/placement.cpp9
-rw-r--r--test/api/annotations.test.cpp2
-rw-r--r--test/api/api_misuse.test.cpp2
-rw-r--r--test/api/custom_layer.test.cpp2
-rw-r--r--test/api/query.test.cpp2
-rw-r--r--test/api/recycle_map.cpp2
-rw-r--r--test/api/zoom_history.cpp2
-rw-r--r--test/fixtures/annotations/debug_sparse/expected.pngbin2933 -> 1387 bytes
-rw-r--r--test/gl/bucket.test.cpp6
-rw-r--r--test/gl/context.test.cpp2
-rw-r--r--test/map/map.test.cpp4
-rw-r--r--test/map/prefetch.test.cpp2
-rw-r--r--test/util/memory.test.cpp6
29 files changed, 68 insertions, 56 deletions
diff --git a/benchmark/api/query.benchmark.cpp b/benchmark/api/query.benchmark.cpp
index 75695c1ad7..7694585526 100644
--- a/benchmark/api/query.benchmark.cpp
+++ b/benchmark/api/query.benchmark.cpp
@@ -34,7 +34,7 @@ public:
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 }};
};
diff --git a/benchmark/api/render.benchmark.cpp b/benchmark/api/render.benchmark.cpp
index 9f1ea68e0b..a1b557777f 100644
--- a/benchmark/api/render.benchmark.cpp
+++ b/benchmark/api/render.benchmark.cpp
@@ -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()) {
@@ -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, { "{}" });
@@ -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);
}
diff --git a/bin/render.cpp b/bin/render.cpp
index 444921ff2b..a13b981d77 100644
--- a/bin/render.cpp
+++ b/bin/render.cpp
@@ -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;
diff --git a/include/mbgl/map/mode.hpp b/include/mbgl/map/mode.hpp
index 256d152e43..4ee289d855 100644
--- a/include/mbgl/map/mode.hpp
+++ b/include/mbgl/map/mode.hpp
@@ -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
};
// We can choose to constrain the map both horizontally or vertically, or only
diff --git a/mapbox-gl-js b/mapbox-gl-js
-Subproject 3f419f30b99271cf05c269c8cd40d5c94811953
+Subproject c6b59388c5da58c3c68d2f0407a59ceb2482313
diff --git a/platform/default/mbgl/map/map_snapshotter.cpp b/platform/default/mbgl/map/map_snapshotter.cpp
index 7b4ec5913b..9341c23cfd 100644
--- a/platform/default/mbgl/map/map_snapshotter.cpp
+++ b/platform/default/mbgl/map/map_snapshotter.cpp
@@ -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);
diff --git a/platform/node/CHANGELOG.md b/platform/node/CHANGELOG.md
index 4b93fca25d..feb2b4185d 100644
--- a/platform/node/CHANGELOG.md
+++ b/platform/node/CHANGELOG.md
@@ -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()
diff --git a/platform/node/src/node_map.cpp b/platform/node/src/node_map.cpp
index 6deccf05bf..b8c5e9cc88 100644
--- a/platform/node/src/node_map.cpp
+++ b/platform/node/src/node_map.cpp
@@ -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
@@ -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,
@@ -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;
diff --git a/platform/node/src/node_map.hpp b/platform/node/src/node_map.hpp
index 8e7f0a3e58..b84f4d576f 100644
--- a/platform/node/src/node_map.hpp
+++ b/platform/node/src/node_map.hpp
@@ -74,6 +74,7 @@ public:
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;
diff --git a/platform/node/test/suite_implementation.js b/platform/node/test/suite_implementation.js
index c5987538d0..b0be2fa0eb 100644
--- a/platform/node/test/suite_implementation.js
+++ b/platform/node/test/suite_implementation.js
@@ -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
});
}
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp
index 09d8883544..d84b74d42a 100644
--- a/src/mbgl/layout/symbol_layout.cpp
+++ b/src/mbgl/layout/symbol_layout.cpp
@@ -314,9 +314,7 @@ void SymbolLayout::addFeature(const std::size_t index,
if (avoidEdges && !inside) return;
- // TODO set this to make api-gl work
- const bool singleTileMode = false && mode == MapMode::Still;
- if (singleTileMode || withinPlus0) {
+ if (mode == MapMode::Tile || withinPlus0) {
symbolInstances.emplace_back(anchor, line, shapedTextOrientations, shapedIcon,
layout.evaluate(zoom, feature), layoutTextSize,
symbolInstances.size(),
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp
index 378bd40ab7..5aa534724f 100644
--- a/src/mbgl/map/map.cpp
+++ b/src/mbgl/map/map.cpp
@@ -149,8 +149,8 @@ void Map::renderStill(StillImageCallback callback) {
return;
}
- if (impl->mode != MapMode::Still) {
- callback(std::make_exception_ptr(util::MisuseException("Map is not in still image render mode")));
+ if (impl->mode != MapMode::Static && impl->mode != MapMode::Tile) {
+ callback(std::make_exception_ptr(util::MisuseException("Map is not in static or tile image render modes")));
return;
}
@@ -794,7 +794,7 @@ void Map::Impl::onStyleError(std::exception_ptr error) {
}
void Map::Impl::onResourceError(std::exception_ptr error) {
- if (mode == MapMode::Still && stillImageRequest) {
+ if (mode != MapMode::Continuous && stillImageRequest) {
auto request = std::move(stillImageRequest);
request->callback(error);
}
diff --git a/src/mbgl/renderer/buckets/circle_bucket.cpp b/src/mbgl/renderer/buckets/circle_bucket.cpp
index 04126990b3..d23f0861f4 100644
--- a/src/mbgl/renderer/buckets/circle_bucket.cpp
+++ b/src/mbgl/renderer/buckets/circle_bucket.cpp
@@ -49,7 +49,7 @@ void CircleBucket::addFeature(const GeometryTileFeature& feature,
// Do not include points that are outside the tile boundaries.
// Include all points in Still mode. You need to include points from
// neighbouring tiles so that they are not clipped at tile boundaries.
- if ((mode != MapMode::Still) &&
+ if ((mode == MapMode::Continuous) &&
(x < 0 || x >= util::EXTENT || y < 0 || y >= util::EXTENT)) continue;
if (segments.empty() || segments.back().vertexLength + vertexLength > std::numeric_limits<uint16_t>::max()) {
diff --git a/src/mbgl/renderer/layers/render_circle_layer.cpp b/src/mbgl/renderer/layers/render_circle_layer.cpp
index e7b022f3ee..fe2e7cd42d 100644
--- a/src/mbgl/renderer/layers/render_circle_layer.cpp
+++ b/src/mbgl/renderer/layers/render_circle_layer.cpp
@@ -63,7 +63,7 @@ void RenderCircleLayer::render(PaintParameters& parameters, RenderSource*) {
parameters.context,
gl::Triangles(),
parameters.depthModeForSublayer(0, gl::DepthMode::ReadOnly),
- parameters.mapMode == MapMode::Still
+ parameters.mapMode != MapMode::Continuous
? parameters.stencilModeForClipping(tile.clip)
: gl::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
diff --git a/src/mbgl/renderer/layers/render_symbol_layer.cpp b/src/mbgl/renderer/layers/render_symbol_layer.cpp
index e194c9c857..04fcb2c3ab 100644
--- a/src/mbgl/renderer/layers/render_symbol_layer.cpp
+++ b/src/mbgl/renderer/layers/render_symbol_layer.cpp
@@ -88,18 +88,13 @@ void RenderSymbolLayer::render(PaintParameters& parameters, RenderSource*) {
const auto& binders,
const auto& paintProperties)
{
- // We clip symbols to their tile extent in still mode.
- const bool needsClipping = false; // TODO parameters.mapMode == MapMode::Still;
-
program.get(paintProperties).draw(
parameters.context,
gl::Triangles(),
values_.pitchAlignment == AlignmentType::Map
? parameters.depthModeForSublayer(0, gl::DepthMode::ReadOnly)
: gl::DepthMode::disabled(),
- needsClipping
- ? parameters.stencilModeForClipping(tile.clip)
- : gl::StencilMode::disabled(),
+ gl::StencilMode::disabled(),
parameters.colorModeForRenderPass(),
std::move(uniformValues),
*buffers.vertexBuffer,
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index 529d1f438d..5d0ffed65f 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -59,7 +59,7 @@ Renderer::Impl::Impl(RendererBackend& backend_,
, layerImpls(makeMutable<std::vector<Immutable<style::Layer::Impl>>>())
, renderLight(makeMutable<Light::Impl>())
, crossTileSymbolIndex(std::make_unique<CrossTileSymbolIndex>())
- , placement(std::make_unique<Placement>(TransformState{}, MapMode::Still)) {
+ , placement(std::make_unique<Placement>(TransformState{}, MapMode::Static)) {
glyphManager->setObserver(this);
}
@@ -83,7 +83,7 @@ void Renderer::Impl::setObserver(RendererObserver* observer_) {
}
void Renderer::Impl::render(const UpdateParameters& updateParameters) {
- if (updateParameters.mode == MapMode::Still) {
+ if (updateParameters.mode != MapMode::Continuous) {
// Don't load/render anyting in still mode until explicitly requested.
if (!updateParameters.stillImageRequest) {
return;
@@ -260,7 +260,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
};
bool loaded = updateParameters.styleLoaded && isLoaded();
- if (updateParameters.mode == MapMode::Still && !loaded) {
+ if (updateParameters.mode != MapMode::Continuous && !loaded) {
return;
}
@@ -355,10 +355,8 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
sortedTilesForInsertion.emplace_back(tile);
tile.used = true;
- // We only need clipping when we're _not_ drawing a symbol layer. The only exception
- // for symbol layers is when we're rendering still images. See render_symbol_layer.cpp
- // for the exception we make there.
- if (!symbolLayer || parameters.mapMode == MapMode::Still) {
+ // We only need clipping when we're _not_ drawing a symbol layer.
+ if (!symbolLayer) {
tile.needsClipping = true;
}
}
@@ -368,7 +366,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
}
bool symbolBucketsChanged = false;
- if (parameters.mapMode == MapMode::Still) {
+ if (parameters.mapMode != MapMode::Continuous) {
// TODO: Think about right way for symbol index to handle still rendering
crossTileSymbolIndex->reset();
}
diff --git a/src/mbgl/text/placement.cpp b/src/mbgl/text/placement.cpp
index 1503db1d83..84753c6ea9 100644
--- a/src/mbgl/text/placement.cpp
+++ b/src/mbgl/text/placement.cpp
@@ -154,7 +154,9 @@ bool Placement::commit(const Placement& prevPlacement, TimePoint now) {
bool placementChanged = false;
- float increment = mapMode == MapMode::Still ? 1.0 : std::chrono::duration<float>(commitTime - prevPlacement.commitTime) / Duration(std::chrono::milliseconds(300));
+ float increment = mapMode == MapMode::Continuous ?
+ std::chrono::duration<float>(commitTime - prevPlacement.commitTime) / Duration(std::chrono::milliseconds(300)) :
+ 1.0;
// add the opacities from the current placement, and copy their current values from the previous placement
for (auto& placementPair : placements) {
@@ -275,10 +277,11 @@ JointOpacityState Placement::getOpacity(uint32_t crossTileSymbolID) const {
}
float Placement::symbolFadeChange(TimePoint now) const {
- if (mapMode == MapMode::Still) {
+ if (mapMode == MapMode::Continuous) {
+ return std::chrono::duration<float>(now - commitTime) / Duration(std::chrono::milliseconds(300));
+ } else {
return 1.0;
}
- return std::chrono::duration<float>(now - commitTime) / Duration(std::chrono::milliseconds(300));
}
bool Placement::hasTransitions(TimePoint now) const {
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index f3d270c459..d5e76fc21e 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -32,7 +32,7 @@ public:
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource,
- threadPool, MapMode::Still };
+ threadPool, MapMode::Static};
void checkRendering(const char * name) {
test::checkImage(std::string("test/fixtures/annotations/") + name,
diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp
index 690c1548e5..363958451b 100644
--- a/test/api/api_misuse.test.cpp
+++ b/test/api/api_misuse.test.cpp
@@ -27,7 +27,7 @@ TEST(API, RenderWithoutCallback) {
HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(),
- pixelRatio, fileSource, threadPool, MapMode::Still);
+ pixelRatio, fileSource, threadPool, MapMode::Static);
map->renderStill(nullptr);
// Force Map thread to join.
diff --git a/test/api/custom_layer.test.cpp b/test/api/custom_layer.test.cpp
index 1c514aeca2..eb1d7e0d3a 100644
--- a/test/api/custom_layer.test.cpp
+++ b/test/api/custom_layer.test.cpp
@@ -90,7 +90,7 @@ TEST(CustomLayer, Basic) {
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource,
- threadPool, MapMode::Still);
+ threadPool, MapMode::Static);
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
map.setLatLngZoom({ 37.8, -122.5 }, 10);
map.getStyle().addLayer(std::make_unique<CustomLayer>(
diff --git a/test/api/query.test.cpp b/test/api/query.test.cpp
index 3f3825eb72..c67ff9064c 100644
--- a/test/api/query.test.cpp
+++ b/test/api/query.test.cpp
@@ -32,7 +32,7 @@ public:
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
Map map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource,
- threadPool, MapMode::Still };
+ threadPool, MapMode::Static};
};
} // end namespace
diff --git a/test/api/recycle_map.cpp b/test/api/recycle_map.cpp
index 8cd622fe79..ca6abac8c1 100644
--- a/test/api/recycle_map.cpp
+++ b/test/api/recycle_map.cpp
@@ -29,7 +29,7 @@ TEST(API, RecycleMapUpdateImages) {
HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(),
- pixelRatio, fileSource, threadPool, MapMode::Still);
+ pixelRatio, fileSource, threadPool, MapMode::Static);
EXPECT_TRUE(map);
diff --git a/test/api/zoom_history.cpp b/test/api/zoom_history.cpp
index 1b1159bf52..df9b6ff2a3 100644
--- a/test/api/zoom_history.cpp
+++ b/test/api/zoom_history.cpp
@@ -30,7 +30,7 @@ TEST(API, ZoomHistory) {
HeadlessFrontend frontend { pixelRatio, fileSource, threadPool };
auto map = std::make_unique<Map>(frontend, MapObserver::nullObserver(), frontend.getSize(),
- pixelRatio, fileSource, threadPool, MapMode::Still);
+ pixelRatio, fileSource, threadPool, MapMode::Static);
EXPECT_TRUE(map);
diff --git a/test/fixtures/annotations/debug_sparse/expected.png b/test/fixtures/annotations/debug_sparse/expected.png
index 3c1ad1599c..493928998d 100644
--- a/test/fixtures/annotations/debug_sparse/expected.png
+++ b/test/fixtures/annotations/debug_sparse/expected.png
Binary files differ
diff --git a/test/gl/bucket.test.cpp b/test/gl/bucket.test.cpp
index f4f153a831..8393fd130d 100644
--- a/test/gl/bucket.test.cpp
+++ b/test/gl/bucket.test.cpp
@@ -47,7 +47,7 @@ TEST(Buckets, CircleBucket) {
BackendScope scope { backend };
gl::Context context;
- CircleBucket bucket { { {0, 0, 0}, MapMode::Still, 1.0 }, {} };
+ CircleBucket bucket { { {0, 0, 0}, MapMode::Static, 1.0 }, {} };
ASSERT_FALSE(bucket.hasData());
ASSERT_FALSE(bucket.needsUpload());
@@ -66,7 +66,7 @@ TEST(Buckets, FillBucket) {
BackendScope scope { backend };
gl::Context context;
- FillBucket bucket { { {0, 0, 0}, MapMode::Still, 1.0 }, {} };
+ FillBucket bucket { { {0, 0, 0}, MapMode::Static, 1.0 }, {} };
ASSERT_FALSE(bucket.hasData());
ASSERT_FALSE(bucket.needsUpload());
@@ -84,7 +84,7 @@ TEST(Buckets, LineBucket) {
BackendScope scope { backend };
gl::Context context;
- LineBucket bucket { { {0, 0, 0}, MapMode::Still, 1.0 }, {}, {} };
+ LineBucket bucket { { {0, 0, 0}, MapMode::Static, 1.0 }, {}, {} };
ASSERT_FALSE(bucket.hasData());
ASSERT_FALSE(bucket.needsUpload());
diff --git a/test/gl/context.test.cpp b/test/gl/context.test.cpp
index 19e8ad5928..179ce5de53 100644
--- a/test/gl/context.test.cpp
+++ b/test/gl/context.test.cpp
@@ -89,7 +89,7 @@ TEST(GLContextMode, Shared) {
HeadlessFrontend frontend { pixelRatio, fileSource, threadPool, {}, GLContextMode::Shared };
- Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource, threadPool, MapMode::Still);
+ Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource, threadPool, MapMode::Static);
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
map.setLatLngZoom({ 37.8, -122.5 }, 10);
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 9358175297..9b34ea89b0 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -72,14 +72,14 @@ public:
HeadlessFrontend frontend;
Map map;
- MapTest(float pixelRatio = 1, MapMode mode = MapMode::Still)
+ MapTest(float pixelRatio = 1, MapMode mode = MapMode::Static)
: frontend(pixelRatio, fileSource, threadPool)
, map(frontend, observer, frontend.getSize(), pixelRatio, fileSource, threadPool, mode) {
}
template <typename T = FileSource>
MapTest(const std::string& cachePath, const std::string& assetRoot,
- float pixelRatio = 1, MapMode mode = MapMode::Still,
+ float pixelRatio = 1, MapMode mode = MapMode::Static,
typename std::enable_if<std::is_same<T, DefaultFileSource>::value>::type* = 0)
: fileSource { cachePath, assetRoot }
, frontend(pixelRatio, fileSource, threadPool)
diff --git a/test/map/prefetch.test.cpp b/test/map/prefetch.test.cpp
index 5c9a22d1bf..4c82b2c965 100644
--- a/test/map/prefetch.test.cpp
+++ b/test/map/prefetch.test.cpp
@@ -23,7 +23,7 @@ TEST(Map, PrefetchTiles) {
ThreadPool threadPool(4);
StubFileSource fileSource;
HeadlessFrontend frontend { { 512, 512 }, 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);
std::vector<int> tiles;
diff --git a/test/util/memory.test.cpp b/test/util/memory.test.cpp
index 54763cd9db..6befb521f0 100644
--- a/test/util/memory.test.cpp
+++ b/test/util/memory.test.cpp
@@ -72,7 +72,7 @@ TEST(Memory, Vector) {
HeadlessFrontend frontend { { 256, 256 }, ratio, test.fileSource, test.threadPool };
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), ratio, test.fileSource,
- test.threadPool, MapMode::Still);
+ test.threadPool, MapMode::Static);
map.setZoom(16); // more map features
map.getStyle().loadURL("mapbox://streets");
@@ -85,7 +85,7 @@ TEST(Memory, Raster) {
HeadlessFrontend frontend { { 256, 256 }, ratio, test.fileSource, test.threadPool };
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), ratio, test.fileSource,
- test.threadPool, MapMode::Still);
+ test.threadPool, MapMode::Static);
map.getStyle().loadURL("mapbox://satellite");
frontend.render(map);
@@ -122,7 +122,7 @@ TEST(Memory, Footprint) {
public:
FrontendAndMap(MemoryTest& test_, const char* style)
: frontend(Size{ 256, 256 }, 2, test_.fileSource, test_.threadPool)
- , map(frontend, MapObserver::nullObserver(), frontend.getSize(), 2, test_.fileSource, test_.threadPool, MapMode::Still) {
+ , map(frontend, MapObserver::nullObserver(), frontend.getSize(), 2, test_.fileSource, test_.threadPool, MapMode::Static) {
map.setZoom(16);
map.getStyle().loadURL(style);
frontend.render(map);