diff options
| author | 2011-01-19 17:01:22 -0800 | |
|---|---|---|
| committer | 2011-01-19 17:01:22 -0800 | |
| commit | 8bb9131c663b5c4548eed1d9f964d06bccfc4da6 (patch) | |
| tree | 4a31193b2dc14338e51de746046392b0ca1bc4aa /libs/rs/rsContext.cpp | |
| parent | eefc82483a90f641275db3084b78c8254cc45046 (diff) | |
| parent | 578b7a2265555655a8a70e8a2d621e906c9c9be0 (diff) | |
Merge "fix [3367893] Rotating device on YouTube's home screen several times kills system_server" into honeycomb
Diffstat (limited to 'libs/rs/rsContext.cpp')
| -rw-r--r-- | libs/rs/rsContext.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 2e0c491c34ef..98f30ae4ead7 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -253,7 +253,11 @@ void Context::deinitEGL() { LOGV("%p, deinitEGL", this); if (mEGL.mContext != EGL_NO_CONTEXT) { - eglMakeCurrent(mEGL.mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, mEGL.mContext); + eglMakeCurrent(mEGL.mDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroySurface(mEGL.mDisplay, mEGL.mSurfaceDefault); + if (mEGL.mSurface != EGL_NO_SURFACE) { + eglDestroySurface(mEGL.mDisplay, mEGL.mSurface); + } eglDestroyContext(mEGL.mDisplay, mEGL.mContext); checkEglError("eglDestroyContext"); } |