summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jamie Gennis <jgennis@google.com> 2011-09-05 14:51:20 -0700
committer Android (Google) Code Review <android-gerrit@google.com> 2011-09-05 14:51:20 -0700
commit7f739ae68c57435964f69c397ec0cf344d0701a2 (patch)
treebb360214097658a2d964f70eab44da877b3efc83
parent408fff6ebad5557e37d68de57ca4df39995f963e (diff)
parente68a52b0a2fbf239c23e622bda45ae50ee7e82ab (diff)
Merge "SurfaceTexture: fix a test deadlock"
-rw-r--r--libs/gui/tests/SurfaceTexture_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gui/tests/SurfaceTexture_test.cpp b/libs/gui/tests/SurfaceTexture_test.cpp
index 44babcf873..b8bc454782 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);