summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2018-02-08 13:37:37 +0100
committerTobrun <tobrun@mapbox.com>2018-02-09 14:22:29 +0100
commitcab2086e1c74eeb1fe23c2d4a5e03776be1592b9 (patch)
tree7775eb11d86925568f0a10ab38501ba0d7cc24c8 /platform/android
parent5a799117ec580155b9192dbb3a1df6406f57f175 (diff)
downloadqtlocation-mapboxgl-cab2086e1c74eeb1fe23c2d4a5e03776be1592b9.tar.gz
[android] - don't recreate surface as part of view resizeandroid-v5.4.1
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java
index c34833e9ce..1e76ffe3fb 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java
@@ -4,7 +4,6 @@ import android.graphics.SurfaceTexture;
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;
@@ -219,13 +218,6 @@ class TextureViewRenderThread extends Thread implements TextureView.SurfaceTextu
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;
@@ -273,6 +265,12 @@ class TextureViewRenderThread extends Thread implements TextureView.SurfaceTextu
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;