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:
Konstantin Käfer
2015-04-16 10:34:30 +02:00
parent cd496645d4
commit 46bf226910
11 changed files with 301 additions and 120 deletions

View File

@@ -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);