summaryrefslogtreecommitdiff
path: root/hwc3
diff options
context:
space:
mode:
authorSally Qi <sallyqi@google.com>2022-08-16 12:55:50 -0700
committerSally Qi <sallyqi@google.com>2022-10-03 13:11:33 -0700
commitdfb463fabff93840f0aee761ba7b05c80a44ee13 (patch)
treedd02acba0c5125defc435b445a6ba58a74208db4 /hwc3
parent112eea9e9299480c286de027aedf244dc1eac620 (diff)
hwc3: Add getOverlaySupport()
Bug: 242588489 Test: atest VtsHalGraphicsComposer3_TargetTest Change-Id: I505a76213549c3ff613c93c707cd01777801455d
Diffstat (limited to 'hwc3')
-rw-r--r--hwc3/Android.mk2
-rw-r--r--hwc3/ComposerClient.cpp6
-rw-r--r--hwc3/ComposerClient.h1
-rw-r--r--hwc3/impl/HalImpl.cpp5
-rw-r--r--hwc3/impl/HalImpl.h1
-rw-r--r--hwc3/include/IComposerHal.h2
6 files changed, 16 insertions, 1 deletions
diff --git a/hwc3/Android.mk b/hwc3/Android.mk
index dff9b73..ef60aa4 100644
--- a/hwc3/Android.mk
+++ b/hwc3/Android.mk
@@ -31,7 +31,7 @@ LOCAL_CFLAGS += \
-DLOG_TAG=\"hwc3\"
# hwc3 re-uses hwc2.2 ComposerResource and libexynosdisplay
-LOCAL_SHARED_LIBRARIES := android.hardware.graphics.composer3-V1-ndk \
+LOCAL_SHARED_LIBRARIES := android.hardware.graphics.composer3-V2-ndk \
android.hardware.graphics.composer@2.1-resources \
android.hardware.graphics.composer@2.2-resources \
android.hardware.graphics.composer@2.4 \
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp
index b576b68..7324e5c 100644
--- a/hwc3/ComposerClient.cpp
+++ b/hwc3/ComposerClient.cpp
@@ -236,6 +236,12 @@ ndk::ScopedAStatus ComposerClient::getHdrCapabilities(int64_t display, HdrCapabi
return TO_BINDER_STATUS(err);
}
+ndk::ScopedAStatus ComposerClient::getOverlaySupport(OverlayProperties* caps) {
+ DEBUG_FUNC();
+ auto err = mHal->getOverlaySupport(caps);
+ return TO_BINDER_STATUS(err);
+}
+
ndk::ScopedAStatus ComposerClient::getMaxVirtualDisplayCount(int32_t* count) {
DEBUG_FUNC();
auto err = mHal->getMaxVirtualDisplayCount(count);
diff --git a/hwc3/ComposerClient.h b/hwc3/ComposerClient.h
index 855fb8b..e10e3b6 100644
--- a/hwc3/ComposerClient.h
+++ b/hwc3/ComposerClient.h
@@ -92,6 +92,7 @@ public:
ndk::ScopedAStatus getDisplayPhysicalOrientation(int64_t display,
common::Transform* orientation) override;
ndk::ScopedAStatus getHdrCapabilities(int64_t display, HdrCapabilities* caps) override;
+ ndk::ScopedAStatus getOverlaySupport(OverlayProperties* caps) override;
ndk::ScopedAStatus getMaxVirtualDisplayCount(int32_t* count) override;
ndk::ScopedAStatus getPerFrameMetadataKeys(int64_t display,
std::vector<PerFrameMetadataKey>* keys) override;
diff --git a/hwc3/impl/HalImpl.cpp b/hwc3/impl/HalImpl.cpp
index c3011f9..a5d229d 100644
--- a/hwc3/impl/HalImpl.cpp
+++ b/hwc3/impl/HalImpl.cpp
@@ -457,6 +457,11 @@ int32_t HalImpl::getHdrCapabilities(int64_t display, HdrCapabilities* caps) {
return HWC2_ERROR_NONE;
}
+int32_t HalImpl::getOverlaySupport([[maybe_unused]] OverlayProperties* caps) {
+ // TODO(b/245570131): implement
+ return HWC2_ERROR_UNSUPPORTED;
+}
+
int32_t HalImpl::getMaxVirtualDisplayCount(int32_t* count) {
uint32_t hwcCount = mDevice->getMaxVirtualDisplayCount();
h2a::translate(hwcCount, *count);
diff --git a/hwc3/impl/HalImpl.h b/hwc3/impl/HalImpl.h
index f772ca4..21af64e 100644
--- a/hwc3/impl/HalImpl.h
+++ b/hwc3/impl/HalImpl.h
@@ -71,6 +71,7 @@ class HalImpl : public IComposerHal {
int32_t getDisplayPhysicalOrientation(int64_t display, common::Transform* orientation) override;
int32_t getDozeSupport(int64_t display, bool& outSupport) override;
int32_t getHdrCapabilities(int64_t display, HdrCapabilities* caps) override;
+ int32_t getOverlaySupport(OverlayProperties* caps) override;
int32_t getMaxVirtualDisplayCount(int32_t* count) override;
int32_t getPerFrameMetadataKeys(int64_t display,
std::vector<PerFrameMetadataKey>* keys) override;
diff --git a/hwc3/include/IComposerHal.h b/hwc3/include/IComposerHal.h
index 6fe25c5..7183dec 100644
--- a/hwc3/include/IComposerHal.h
+++ b/hwc3/include/IComposerHal.h
@@ -55,6 +55,7 @@
#include <aidl/android/hardware/graphics/composer3/HdrCapabilities.h>
#include <aidl/android/hardware/graphics/composer3/LayerBrightness.h>
#include <aidl/android/hardware/graphics/composer3/LayerCommand.h>
+#include <aidl/android/hardware/graphics/composer3/OverlayProperties.h>
#include <aidl/android/hardware/graphics/composer3/ParcelableBlendMode.h>
#include <aidl/android/hardware/graphics/composer3/ParcelableComposition.h>
#include <aidl/android/hardware/graphics/composer3/ParcelableDataspace.h>
@@ -137,6 +138,7 @@ class IComposerHal {
common::Transform* orientation) = 0;
virtual int32_t getDozeSupport(int64_t display, bool& outSupport) = 0;
virtual int32_t getHdrCapabilities(int64_t display, HdrCapabilities* caps) = 0;
+ virtual int32_t getOverlaySupport(OverlayProperties* caps) = 0;
virtual int32_t getMaxVirtualDisplayCount(int32_t* count) = 0;
virtual int32_t getPerFrameMetadataKeys(int64_t display,
std::vector<PerFrameMetadataKey>* keys) = 0;