OSDN Git Service

Fix the memory leak in virtualdisplay.cpp.
authorHeYue <yue.he@intel.com>
Sat, 29 Sep 2018 06:59:21 +0000 (14:59 +0800)
committerLin Johnson <johnson.lin@intel.com>
Mon, 8 Oct 2018 01:48:41 +0000 (09:48 +0800)
commit00ae7521e9bad8c41efd6ec96a442804807a4b12
treea03fe9545bb31311038a6b290851ac42798feaa4
parent76cd727a9324180bc26e1a08509d0edf624ec3e9
Fix the memory leak in virtualdisplay.cpp.
The memory leak causing the dmabuf fd that hwc opened increase all the time.
Causing the UI hang or reboot.
1: The buffer handle is without any 3D or framebuffer resource, thus it can
be destoryed directly instead of in the compositor thread
2: This will decoule the SetOuputBuffer and Present call. Previous it assumed
that SetOutputBuffer and Present is 1:1, but actually there is no guarantee from
the framework that it will be 1: This will decouple the SetOuputBuffer and Present call.
Previous it assumed that SetOutputBuffer and Present is 1:1, but actually there is no
guarantee from the framework that it will be 1:1

Jira:  https://jira01.devtools.intel.com/browse/OAM-67797
Tests: play video and UI doesn't hang or reboot. The fd that hwc opened is stable.

Signed-off-by: HeYue <yue.he@intel.com>
common/display/virtualdisplay.cpp