SurfaceFlinger: reset the FB_TGT acquire fence

This change makes SurfaceFlinger reset the acquire fence fd to -1 after each
call to HWComposer::commit.  The HWComposer implementation is resonsible for
closing the fd, so SurfaceFlinger should make sure not to pass it to HWC
multiple times.

Change-Id: I79554d9f6d6ef2b77d632d40251516c1f5b16ddb
Bug: 7258954
This commit is contained in:
Jamie Gennis 2012-09-30 20:02:03 -07:00 committed by Android (Google) Code Review
parent ec0f5e5f0c
commit d30b36d1fd
1 changed files with 1 additions and 0 deletions

View File

@ -613,6 +613,7 @@ int HWComposer::getAndResetReleaseFenceFd(int32_t id) {
const DisplayData& disp(mDisplayData[id]);
if (disp.framebufferTarget) {
fd = disp.framebufferTarget->releaseFenceFd;
disp.framebufferTarget->acquireFenceFd = -1;
disp.framebufferTarget->releaseFenceFd = -1;
}
}