Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Don't recreate TextureView surface as part of view resize #11148

Merged
merged 1 commit into from
Feb 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.support.annotation.NonNull;
import android.support.annotation.UiThread;
import android.view.TextureView;

import com.mapbox.mapboxsdk.maps.renderer.egl.EGLConfigChooser;

import java.lang.ref.WeakReference;
Expand Down Expand Up @@ -219,13 +218,6 @@ public void run() {
break;
}

// Check if the size has changed
if (sizeChanged) {
recreateSurface = true;
sizeChanged = false;
break;
}

// Reset the request render flag now, so we can catch new requests
// while rendering
requestRender = false;
Expand Down Expand Up @@ -273,6 +265,12 @@ public void run() {
continue;
}

if (sizeChanged) {
mapRenderer.onSurfaceChanged(gl, w, h);
sizeChanged = false;
continue;
}

// Don't continue without a surface
if (eglHolder.eglSurface == EGL10.EGL_NO_SURFACE) {
continue;
Expand Down