Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f7519f3c authored by Naomi Luis's avatar Naomi Luis Committed by Giulio Cervera
Browse files

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
parent e8eaa711
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment