diff options
| author | 2011-04-15 18:15:13 -0700 | |
|---|---|---|
| committer | 2011-04-15 18:15:13 -0700 | |
| commit | a36a302e92f4b6367663dec4ead42b67be4f9a5c (patch) | |
| tree | 2d57b9bc5270941430eb6a9a2425a4b5c6902292 /libs/gui/SurfaceTexture.cpp | |
| parent | ecdd04ce8761fa42dbbf3802dc4d51ca767ff4f5 (diff) | |
| parent | 4cb18881b55b82a24873ccd8e298bc2d5a9c17e5 (diff) | |
Merge "Fix a GraphicBuffer leak in SurfaceTexture"
Diffstat (limited to 'libs/gui/SurfaceTexture.cpp')
| -rw-r--r-- | libs/gui/SurfaceTexture.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index f4e2a67616..e2346f060e 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -172,7 +172,6 @@ sp<GraphicBuffer> SurfaceTexture::requestBuffer(int buf, mSlots[buf].mEglImage = EGL_NO_IMAGE_KHR; mSlots[buf].mEglDisplay = EGL_NO_DISPLAY; } - mAllocdBuffers.add(graphicBuffer); } return graphicBuffer; } @@ -425,19 +424,6 @@ void SurfaceTexture::freeAllBuffers() { mSlots[i].mEglDisplay = EGL_NO_DISPLAY; } } - - int exceptBuf = -1; - for (size_t i = 0; i < mAllocdBuffers.size(); i++) { - if (mAllocdBuffers[i] == mCurrentTextureBuf) { - exceptBuf = i; - break; - } - } - mAllocdBuffers.clear(); - if (exceptBuf >= 0) { - mAllocdBuffers.add(mCurrentTextureBuf); - } - mGraphicBufferAlloc->freeAllGraphicBuffersExcept(exceptBuf); } EGLImageKHR SurfaceTexture::createImage(EGLDisplay dpy, |