drm_hwcomposer: Fix missing present and release fence handling
- Use wrappers instead of exposed raw fd in the HwcDisplay API.
- Add fences to the HWC3 command stream.
Fixes: b864ccf845e5 ("drm_hwcomposer: Remove HWC2 usage for Present")
Change-Id: Iadfa39d9b3f58d1e542a1738f27809155fdbf3f6
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/hwc2_device/HwcDisplay.h b/hwc2_device/HwcDisplay.h
index 8dc059c..ad58ae8 100644
--- a/hwc2_device/HwcDisplay.h
+++ b/hwc2_device/HwcDisplay.h
@@ -101,10 +101,10 @@
// Present previously staged properties, and return fences to indicate when
// the new content has been presented, and when the previous buffers have
// been released.
- using ReleaseFence = std::pair<hwc2_layer_t, int32_t>;
- auto PresentStagedComposition(int32_t *out_present_fence,
- std::vector<ReleaseFence> *out_release_fences)
- -> HWC2::Error;
+ using ReleaseFence = std::pair<hwc2_layer_t, SharedFd>;
+ auto PresentStagedComposition(SharedFd &out_present_fence,
+ std::vector<ReleaseFence> &out_release_fences)
+ -> bool;
// HWC2 Hooks - these should not be used outside of the hwc2 device.
HWC2::Error AcceptDisplayChanges();