Skip to content

Commit

Permalink
Android 10 glThreadManager changed to non static (#2901)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcristici authored Oct 7, 2024
1 parent 26f00f1 commit c966911
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class MapboxGLSurfaceView extends SurfaceView implements SurfaceHolder.Callback2 {

private static final String TAG = "GLSurfaceView";
private static final GLThreadManager glThreadManager = new GLThreadManager();
private final GLThreadManager glThreadManager = new GLThreadManager();

private final WeakReference<MapboxGLSurfaceView> viewWeakReference = new WeakReference<>(this);
private GLThread glThread;
Expand Down Expand Up @@ -558,6 +558,7 @@ static class GLThread extends Thread {
renderMode = RENDERMODE_CONTINUOUSLY;
wantRenderNotification = false;
mGLSurfaceViewWeakRef = glSurfaceViewWeakRef;
glThreadManager = glSurfaceViewWeakRef.get().glThreadManager;
}

@Override
Expand Down Expand Up @@ -1041,6 +1042,7 @@ public void queueEvent(@NonNull Runnable r) {
private ArrayList<Runnable> eventQueue = new ArrayList<>();
private boolean sizeChanged = true;
private Runnable finishDrawingRunnable = null;
private GLThreadManager glThreadManager = null;
// End of member variables protected by the sGLThreadManager monitor.

private EglHelper eglHelper;
Expand Down

0 comments on commit c966911

Please sign in to comment.