[android] Re-initialise renderer, backend and context when the android system destroyed the underlying gl resources
This commit is contained in:
committed by
Ivo van Dongen
parent
6211db6968
commit
67285f3a95
@@ -1,5 +1,7 @@
|
||||
#include "android_renderer_backend.hpp"
|
||||
|
||||
#include <mbgl/gl/context.hpp>
|
||||
|
||||
#include <EGL/egl.h>
|
||||
|
||||
#include <cassert>
|
||||
@@ -51,5 +53,11 @@ void AndroidRendererBackend::updateAssumedState() {
|
||||
assumeViewport(0, 0, getFramebufferSize());
|
||||
}
|
||||
|
||||
void AndroidRendererBackend::markContextLost() {
|
||||
if (context) {
|
||||
context->setCleanupOnDestruction(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace android
|
||||
} // namspace mbgl
|
||||
|
||||
Reference in New Issue
Block a user