Skip to content

Commit 08b997c

Browse files
Jamie GennisAndroid (Google) Code Review
authored andcommitted
Merge "SurfaceTexture: fix a test deadlock"
2 parents 2e6f49c + 32704dc commit 08b997c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libs/gui/tests/SurfaceTexture_test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,6 @@ TEST_F(SurfaceTextureGLTest, TexturingFromGLFilledRGBABufferPow2) {
974974

975975
eglSwapBuffers(mEglDisplay, stcEglSurface);
976976

977-
eglDestroySurface(mEglDisplay, stcEglSurface);
978-
979977
// Do the consumer side of things
980978
EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface,
981979
mEglContext));
@@ -985,6 +983,10 @@ TEST_F(SurfaceTextureGLTest, TexturingFromGLFilledRGBABufferPow2) {
985983

986984
mST->updateTexImage();
987985

986+
// We must wait until updateTexImage has been called to destroy the
987+
// EGLSurface because we're in synchronous mode.
988+
eglDestroySurface(mEglDisplay, stcEglSurface);
989+
988990
glClearColor(0.2, 0.2, 0.2, 0.2);
989991
glClear(GL_COLOR_BUFFER_BIT);
990992

0 commit comments

Comments
 (0)