align static render mode and still image render mode
- static rendering now also runs in a separate thread; you have to start it with map.start(Map::Mode::Static) and join the thread with map.stop() before destructing the Map object - map.renderStill() takes a callback with will be invoked on the *map* thread, so you'll have to figure out your own method of dispatching back to the main thread.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <mbgl/map/view.hpp>
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/map/still_image.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
@@ -8,6 +9,14 @@ void View::initialize(Map *map_) {
|
||||
map = map_;
|
||||
}
|
||||
|
||||
void View::discard() {
|
||||
// no-op
|
||||
}
|
||||
|
||||
std::unique_ptr<StillImage> View::readStillImage() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void View::resize(uint16_t width, uint16_t height, float ratio, uint16_t fbWidth, uint16_t fbHeight) {
|
||||
assert(map);
|
||||
map->resize(width, height, ratio, fbWidth, fbHeight);
|
||||
|
||||
Reference in New Issue
Block a user