fix Android Vulkan instrumentation tests (#4091)
This commit is contained in:
@@ -16,14 +16,12 @@ public class VulkanTextureViewRenderThread extends TextureViewRenderThread {
|
||||
}
|
||||
|
||||
void cleanup() {
|
||||
if (surface == null) {
|
||||
return;
|
||||
if (surface != null) {
|
||||
mapRenderer.onSurfaceDestroyed();
|
||||
surface.release();
|
||||
surface = null;
|
||||
}
|
||||
|
||||
mapRenderer.onSurfaceDestroyed();
|
||||
surface.release();
|
||||
surface = null;
|
||||
|
||||
hasNativeSurface = false;
|
||||
}
|
||||
|
||||
@@ -56,14 +54,17 @@ public class VulkanTextureViewRenderThread extends TextureViewRenderThread {
|
||||
}
|
||||
|
||||
if (this.destroySurface) {
|
||||
surface = null;
|
||||
destroySurface = true;
|
||||
if (surface != null) {
|
||||
surface.release();
|
||||
surface = null;
|
||||
}
|
||||
|
||||
this.destroySurface = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (surfaceTexture != null && !paused && requestRender
|
||||
&& (surface == null || this.sizeChanged)) {
|
||||
if (surfaceTexture != null && !paused && requestRender) {
|
||||
|
||||
w = width;
|
||||
h = height;
|
||||
@@ -87,10 +88,6 @@ public class VulkanTextureViewRenderThread extends TextureViewRenderThread {
|
||||
break;
|
||||
}
|
||||
|
||||
if (requestRender && !paused) {
|
||||
break;
|
||||
}
|
||||
|
||||
// Wait until needed
|
||||
lock.wait();
|
||||
|
||||
@@ -113,11 +110,11 @@ public class VulkanTextureViewRenderThread extends TextureViewRenderThread {
|
||||
|
||||
if (destroySurface) {
|
||||
mapRenderer.onSurfaceDestroyed();
|
||||
destroySurface = false;
|
||||
synchronized (lock) {
|
||||
this.hasNativeSurface = false;
|
||||
lock.notifyAll();
|
||||
}
|
||||
destroySurface = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user