diff options
author | Jamie Gennis <jgennis@google.com> | 2011-08-30 19:04:42 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-08-30 19:06:40 -0700 |
commit | 32704dcff71fc2469f41b8aa48058c4818fc6908 (patch) | |
tree | 92780b0211e53ec52bf1ad8596cff4840429a3be /libs/gui | |
parent | 9c93db60e6d9172e1957e5e31a6c5b82e2494420 (diff) | |
download | frameworks_base-32704dcff71fc2469f41b8aa48058c4818fc6908.zip frameworks_base-32704dcff71fc2469f41b8aa48058c4818fc6908.tar.gz frameworks_base-32704dcff71fc2469f41b8aa48058c4818fc6908.tar.bz2 |
SurfaceTexture: fix a test deadlock
This change fixes a test issue that resulted in a deadlock.
Change-Id: I4729e8dd47c8f5fea49bfeff3cea58627ead6d04
Bug: 5174876
Diffstat (limited to 'libs/gui')
-rw-r--r-- | libs/gui/tests/SurfaceTexture_test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp index 44babcf..b8bc454 100644 --- a/libs/gui/tests/SurfaceTexture_test.cpp +++ b/libs/gui/tests/SurfaceTexture_test.cpp @@ -974,8 +974,6 @@ TEST_F(SurfaceTextureGLTest, TexturingFromGLFilledRGBABufferPow2) { eglSwapBuffers(mEglDisplay, stcEglSurface); - eglDestroySurface(mEglDisplay, stcEglSurface); - // Do the consumer side of things EXPECT_TRUE(eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)); @@ -985,6 +983,10 @@ TEST_F(SurfaceTextureGLTest, TexturingFromGLFilledRGBABufferPow2) { mST->updateTexImage(); + // We must wait until updateTexImage has been called to destroy the + // EGLSurface because we're in synchronous mode. + eglDestroySurface(mEglDisplay, stcEglSurface); + glClearColor(0.2, 0.2, 0.2, 0.2); glClear(GL_COLOR_BUFFER_BIT); |