drive map rendering from main thread

This commit is contained in:
Konstantin Käfer
2015-05-22 15:56:05 +02:00
committed by John Firebaugh
parent 740281cc89
commit 84e2ea886d
14 changed files with 71 additions and 35 deletions

View File

@@ -124,12 +124,16 @@ void NativeMapView::deactivate() {
}
}
void NativeMapView::invalidate(std::function<void()> render) {
void NativeMapView::invalidate() {
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::invalidate");
// TODO: inform the main thread that it must call map->renderSync();
}
void NativeMapView::swap() {
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::invalidate");
if ((display != EGL_NO_DISPLAY) && (surface != EGL_NO_SURFACE)) {
render();
if (!eglSwapBuffers(display, surface)) {
mbgl::Log::Error(mbgl::Event::OpenGL, "eglSwapBuffers() returned error %d",
eglGetError());