Skip to content

Commit f09263e

Browse files
author
Jamie Gennis
committed
SurfaceTexture: add updateTexImage synchronization
This change makes the SurfaceTexture JNI updateTexImage call the native SurfaceTexture's doGLFenceWait method to perform the needed synchronization. Change-Id: Ie70a1fe6b44d439d1ffe7b97689a421ff8c02fda
1 parent 0458a69 commit f09263e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/jni/android/graphics/SurfaceTexture.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ static void SurfaceTexture_updateTexImage(JNIEnv* env, jobject thiz)
223223
} else if (err < 0) {
224224
jniThrowRuntimeException(env, "Error during updateTexImage (see logcat for details)");
225225
}
226+
err = surfaceTexture->doGLFenceWait();
227+
if (err != NO_ERROR) {
228+
jniThrowRuntimeException(env, "Error waiting for fence (see logcat for details)");
229+
}
226230
}
227231

228232
static jint SurfaceTexture_detachFromGLContext(JNIEnv* env, jobject thiz)

0 commit comments

Comments
 (0)