drm_hwcomposer: Stop using HWC2 for setting layer buffer
Clean up HWC3 implementation around setting layer buffers a bit by
duping the acquire fence rather than relying on const_cast.
Set the layer buffer through LayerProperties instead of through the HWC2
SetLayerBuffer API.
Change-Id: Ifd873423d5536cdb07f4d6d868ef3a9fd641fafe
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/hwc2_device/HwcLayer.h b/hwc2_device/HwcLayer.h
index b8fb959..e1d62b7 100644
--- a/hwc2_device/HwcLayer.h
+++ b/hwc2_device/HwcLayer.h
@@ -28,8 +28,13 @@
class HwcLayer {
public:
+ struct Buffer {
+ buffer_handle_t buffer_handle;
+ SharedFd acquire_fence;
+ };
// A set of properties to be validated.
struct LayerProperties {
+ std::optional<Buffer> buffer;
std::optional<BufferBlendMode> blend_mode;
std::optional<BufferColorSpace> color_space;
std::optional<BufferSampleRange> sample_range;