Move still image callback to MapContext

This commit is contained in:
John Firebaugh
2015-04-23 15:18:47 -07:00
parent f0b229730f
commit f8db45f19a
5 changed files with 26 additions and 29 deletions

View File

@@ -64,19 +64,8 @@ void Map::resume() {
data->condResume.notify_all();
}
void Map::renderStill(StillImageCallback fn) {
assert(Environment::currentlyOn(ThreadType::Main));
if (data->mode != MapMode::Still) {
throw util::Exception("Map is not in still image render mode");
}
if (data->callback) {
throw util::Exception("Map is currently rendering an image");
}
data->callback = std::move(fn);
update(Update::RenderStill);
void Map::renderStill(StillImageCallback callback) {
context->invoke(&MapContext::renderStill, callback);
}
void Map::renderSync() {