drm_hwcomposer: Clean up SetLayerBlendMode for hwc3
Don't use the existing HWC2 api. Remove related hwc2/hwc3 conversion
helper.
Change-Id: Ie3e53d1854df2e895360bd0c445d398649ab310a
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/hwc2_device/HwcLayer.h b/hwc2_device/HwcLayer.h
index b69ce5b..21e6b58 100644
--- a/hwc2_device/HwcLayer.h
+++ b/hwc2_device/HwcLayer.h
@@ -16,6 +16,7 @@
#pragma once
+#include <aidl/android/hardware/graphics/common/Transform.h>
#include <hardware/hwcomposer2.h>
#include "bufferinfo/BufferInfoGetter.h"
@@ -27,6 +28,11 @@
class HwcLayer {
public:
+ // A set of properties to be validated.
+ struct LayerProperties {
+ std::optional<BufferBlendMode> blend_mode;
+ };
+
explicit HwcLayer(HwcDisplay *parent_display) : parent_(parent_display){};
HWC2::Composition GetSfType() const {
@@ -61,7 +67,9 @@
return layer_data_;
}
- // Layer hooks
+ void SetLayerProperties(const LayerProperties &layer_properties);
+
+ // HWC2 Layer hooks
HWC2::Error SetCursorPosition(int32_t /*x*/, int32_t /*y*/);
HWC2::Error SetLayerBlendMode(int32_t mode);
HWC2::Error SetLayerBuffer(buffer_handle_t buffer, int32_t acquire_fence);