diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2019-06-04 12:44:46 +0200 |
---|---|---|
committer | tobrun <tobrun.van.nuland@gmail.com> | 2019-06-04 12:44:46 +0200 |
commit | 0f877c972a1dd2a737280029262b00fae0ddaa1f (patch) | |
tree | 179ac26ed1a6e7aec2419c47254335dddbc8119b | |
parent | b54fc5891e9353c11ddf2d34a070cb62a702b0db (diff) | |
download | qtlocation-mapboxgl-upstream/tvn-sigsegv11.tar.gz |
[android] - add synchronisation blocks to GLSurfaceViewMapRendererupstream/tvn-sigsegv11
2 files changed, 12 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/glsurfaceview/GLSurfaceViewMapRenderer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/glsurfaceview/GLSurfaceViewMapRenderer.java index 0f266a2cfb..acd64cd184 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/glsurfaceview/GLSurfaceViewMapRenderer.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/glsurfaceview/GLSurfaceViewMapRenderer.java @@ -81,17 +81,23 @@ public class GLSurfaceViewMapRenderer extends MapRenderer implements GLSurfaceVi @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { - super.onSurfaceCreated(gl, config); + synchronized (lock) { + super.onSurfaceCreated(gl, config); + } } @Override protected void onSurfaceDestroyed() { - super.onSurfaceDestroyed(); + synchronized (lock) { + super.onSurfaceDestroyed(); + } } @Override public void onSurfaceChanged(GL10 gl, int width, int height) { - super.onSurfaceChanged(gl, width, height); + synchronized (lock) { + super.onSurfaceChanged(gl, width, height); + } } @Override diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewMapRenderer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewMapRenderer.java index 88c29d6cbf..1449b1afbe 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewMapRenderer.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewMapRenderer.java @@ -53,7 +53,9 @@ public class TextureViewMapRenderer extends MapRenderer { */ @Override protected void onSurfaceChanged(GL10 gl, int width, int height) { - super.onSurfaceChanged(gl, width, height); + synchronized (lock) { + super.onSurfaceChanged(gl, width, height); + } } /** |