Merge pull request #1290 from mapbox/1290-static-to-still
Rename Static => Still
This commit is contained in:
@@ -83,7 +83,7 @@ int main(int argc, char *argv[]) {
|
||||
HeadlessView view;
|
||||
Map map(view, fileSource);
|
||||
|
||||
map.start(Map::Mode::Static);
|
||||
map.start(Map::Mode::Still);
|
||||
|
||||
// Set access token if present
|
||||
if (token.size()) {
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
enum class Mode : uint8_t {
|
||||
None, // we're not doing any processing
|
||||
Continuous, // continually updating map
|
||||
Static, // a once-off static image.
|
||||
Still, // a once-off still image.
|
||||
};
|
||||
|
||||
explicit Map(View&, FileSource&);
|
||||
|
||||
@@ -247,15 +247,15 @@ void Map::resume() {
|
||||
void Map::renderStill(StillImageCallback fn) {
|
||||
assert(Environment::currentlyOn(ThreadType::Main));
|
||||
|
||||
if (mode != Mode::Static) {
|
||||
throw util::Exception("Map is not in static render mode");
|
||||
if (mode != Mode::Still) {
|
||||
throw util::Exception("Map is not in still image render mode");
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
throw util::Exception("Map is currently rendering an image");
|
||||
}
|
||||
|
||||
assert(mode == Mode::Static);
|
||||
assert(mode == Mode::Still);
|
||||
|
||||
callback = std::move(fn);
|
||||
|
||||
@@ -287,7 +287,7 @@ void Map::run() {
|
||||
uv_run(env->loop, UV_RUN_DEFAULT);
|
||||
checkForPause();
|
||||
}
|
||||
} else if (mode == Mode::Static) {
|
||||
} else if (mode == Mode::Still) {
|
||||
terminating = false;
|
||||
while (!terminating) {
|
||||
uv_run(env->loop, UV_RUN_DEFAULT);
|
||||
|
||||
@@ -24,7 +24,7 @@ TEST(API, RepeatedRender) {
|
||||
|
||||
Map map(view, fileSource);
|
||||
|
||||
map.start(Map::Mode::Static);
|
||||
map.start(Map::Mode::Still);
|
||||
|
||||
{
|
||||
view.resize(128, 512, 1);
|
||||
|
||||
@@ -18,7 +18,7 @@ TEST(API, SetStyle) {
|
||||
|
||||
Map map(view, fileSource);
|
||||
|
||||
map.start(Map::Mode::Static);
|
||||
map.start(Map::Mode::Still);
|
||||
|
||||
map.setStyleJSON("invalid", "test/suite");
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ TEST_P(HeadlessTest, render) {
|
||||
DefaultFileSource fileSource(nullptr);
|
||||
Map map(view, fileSource);
|
||||
|
||||
map.start(Map::Mode::Static);
|
||||
map.start(Map::Mode::Still);
|
||||
|
||||
map.setClasses(classes);
|
||||
map.setStyleJSON(style, "test/suite");
|
||||
|
||||
Reference in New Issue
Block a user