drm_hwcomposer: Drop content type for hwc3
Support for content type is not supported in HwcDisplay, so don't call
the existing HWC2 hooks and simply return an empty vector.
Whenever support for content type is added, an appropriate interface
should be added to HwcDisplay rather than using the HWC2 hooks anyways.
Change-Id: If520a8144fcb3e3ca122144aa9a1440acc906edf
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp
index 2efce8f..950e269 100644
--- a/hwc3/ComposerClient.cpp
+++ b/hwc3/ComposerClient.cpp
@@ -744,24 +744,8 @@
return ToBinderStatus(hwc3::Error::kBadDisplay);
}
- uint32_t out_num_supported_types = 0;
- auto error = Hwc2toHwc3Error(
- display->GetSupportedContentTypes(&out_num_supported_types, nullptr));
- if (error != hwc3::Error::kNone) {
- return ToBinderStatus(error);
- }
-
- std::vector<uint32_t> out_supported_types(out_num_supported_types);
- error = Hwc2toHwc3Error(
- display->GetSupportedContentTypes(&out_num_supported_types,
- out_supported_types.data()));
- if (error != hwc3::Error::kNone) {
- return ToBinderStatus(error);
- }
-
- for (const auto type : out_supported_types) {
- types->push_back(Hwc2ContentTypeToHwc3(type));
- }
+ // Support for ContentType is not implemented.
+ types->clear();
return ndk::ScopedAStatus::ok();
}
@@ -885,8 +869,10 @@
return ToBinderStatus(hwc3::Error::kBadDisplay);
}
- auto error = display->SetContentType(Hwc3ContentTypeToHwc2(type));
- return ToBinderStatus(Hwc2toHwc3Error(error));
+ if (type == ContentType::NONE) {
+ return ndk::ScopedAStatus::ok();
+ }
+ return ToBinderStatus(hwc3::Error::kUnsupported);
}
ndk::ScopedAStatus ComposerClient::setDisplayedContentSamplingEnabled(