libhybris/libhybris — pull request #228 by foolab (2014-06-20 21:00:21+00:00)
Title: [hybris] Don't leak gralloc buffers created by eglHybrisCreateNativeBuff...

...er()

The same class is used to wrap buffers created by eglHybrisCreateNativeBuffer()
and eglHybrisCreateRemoteBuffer() but the difference is that a native buffer
is allocated (and needs to be free'd) while a remote buffer is registered and
needs to be unregistered only.

Since major changes in that code is not a wise idea, A flag has ben added to
RemoteWindowBuffer (m_allocated) so it can detect both cases and free the allocated
buffer and unregister the registered buffer.