summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/renderer/textureview/TextureViewRenderThread.java8
1 files changed, 7 insertions, 1 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 8f4f1c852c..261bae3a13 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
@@ -2,6 +2,7 @@ package com.mapbox.mapboxsdk.maps.renderer.textureview;
import android.graphics.SurfaceTexture;
import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
import android.support.annotation.UiThread;
import android.view.TextureView;
import com.mapbox.mapboxsdk.log.Logger;
@@ -26,7 +27,9 @@ class TextureViewRenderThread extends Thread implements TextureView.SurfaceTextu
private static final String TAG = "Mbgl-TextureViewRenderThread";
+ @NonNull
private final TextureViewMapRenderer mapRenderer;
+ @NonNull
private final EGLHolder eglHolder;
// Lock used for synchronization
@@ -34,6 +37,7 @@ class TextureViewRenderThread extends Thread implements TextureView.SurfaceTextu
// Guarded by lock
private final ArrayList<Runnable> eventQueue = new ArrayList<>();
+ @Nullable
private SurfaceTexture surface;
private int width;
private int height;
@@ -118,7 +122,7 @@ class TextureViewRenderThread extends Thread implements TextureView.SurfaceTextu
/**
* May be called from any thread
*/
- void queueEvent(Runnable runnable) {
+ void queueEvent(@Nullable Runnable runnable) {
if (runnable == null) {
throw new IllegalArgumentException("runnable must not be null");
}
@@ -328,6 +332,7 @@ class TextureViewRenderThread extends Thread implements TextureView.SurfaceTextu
private boolean translucentSurface;
private EGL10 egl;
+ @Nullable
private EGLConfig eglConfig;
private EGLDisplay eglDisplay = EGL10.EGL_NO_DISPLAY;
private EGLContext eglContext = EGL10.EGL_NO_CONTEXT;
@@ -370,6 +375,7 @@ class TextureViewRenderThread extends Thread implements TextureView.SurfaceTextu
}
}
+ @NonNull
GL10 createGL() {
return (GL10) eglContext.getGL();
}