[android] re-create renderer on surface update after app backgrounding (in case egl context is preserved, but surface is not)
This commit is contained in:
committed by
Ivo van Dongen
parent
7c874ab815
commit
96fef8172b
@@ -184,7 +184,12 @@ void MapRenderer::onSurfaceCreated(JNIEnv&) {
|
||||
}
|
||||
}
|
||||
|
||||
void MapRenderer::onSurfaceChanged(JNIEnv&, jint width, jint height) {
|
||||
void MapRenderer::onSurfaceChanged(JNIEnv& env, jint width, jint height) {
|
||||
if (!renderer) {
|
||||
// In case the surface has been destroyed (due to app back-grounding)
|
||||
onSurfaceCreated(env);
|
||||
}
|
||||
|
||||
backend->resizeFramebuffer(width, height);
|
||||
framebufferSizeChanged = true;
|
||||
requestRender();
|
||||
|
||||
Reference in New Issue
Block a user