Hold a reference to the allocated buffers in GraphicBufferAlloc
Store the allocated GraphicBuffers in a vector list. This list is cleared only when SurfaceTextures requests that the buffers be freed. Premature deletion of GraphicBuffers and therefore deallocation of gralloc handles are prevented. This change partially reverts: commit 5f05f99a Author: Mathias Agopian <mathias@google.com> Date: Fri Apr 8 19:10:43 2011 -0700 Fix a GraphicBuffer leak in SurfaceTexture This leak was intentional, it was there to deal with the fact that some gralloc implementations don't track buffer handles with file-descriptors so buffers needed to stay alive until there were registered, which is not guaranteed by binder transactions. Change-Id: Ia732806bf8d8d15b66944569e8aa2120641d9812 CRs-fixed: 327655
Loading
Please register or sign in to comment