OSDN Git Service

drm_hwcomposer: Reference count NvImporter buffers
authorSean Paul <seanpaul@chromium.org>
Wed, 10 Jun 2015 18:30:47 +0000 (14:30 -0400)
committerSean Paul <seanpaul@chromium.org>
Wed, 10 Jun 2015 18:54:19 +0000 (14:54 -0400)
commit419b5e015b78f28838a4f270c906afcc3b2e429c
tree4aa2003121b56c329d668c6efa65f0145cf83846
parent1eb6006fb7d950c5aefb202459234c96f8bf2895
drm_hwcomposer: Reference count NvImporter buffers

Instead of directly freeing buffers from the NvImporter
release callback, use reference counting to ensure that
we:
    (a) don't free the buffer while NvGralloc is still using it
    (b) don't free the buffer while HWC is still using it

Before this patch, we weren't satisifying (b). This would
cause us to free a buffer before and while it was on the
screen.

Change-Id: I6bbc541c72df4d5f12a8734de2f2e68168b73a07
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm_hwcomposer.h
nvimporter.cpp
nvimporter.h