File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
android/src/main/java/fr/greweb/rnwebgl Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public void run() {
58
58
}
59
59
}
60
60
61
- public void onDrawFrame (GL10 unused ) {
61
+ public synchronized void onDrawFrame (GL10 unused ) {
62
62
// Flush any queued events
63
63
for (Runnable r : mEventQueue ) {
64
64
r .run ();
@@ -83,11 +83,11 @@ public void onDetachedFromWindow() {
83
83
super .onDetachedFromWindow ();
84
84
}
85
85
86
- public void runOnGLThread (Runnable r ) {
86
+ public synchronized void runOnGLThread (Runnable r ) {
87
87
mEventQueue .add (r );
88
88
}
89
89
90
- public static void runOnGLThread (int ctxId , Runnable r ) {
90
+ public synchronized static void runOnGLThread (int ctxId , Runnable r ) {
91
91
RNWebGLView glView = mGLViewMap .get (ctxId );
92
92
if (glView != null ) {
93
93
glView .runOnGLThread (r );
You can’t perform that action at this time.
0 commit comments