drm_hwcomposer: Implement getDisplayConfigurations
This deprecates calls like getDisplayConfigs and getDisplayAttribute.
Once HWC2 support has been removed from drm_hwcomposer, the legacy calls
could be implemented by calling getDisplayConfigurations.
The main different between the two is that in HWC3, the dpi is in
dots-per-inch and its unit is float. In HWC2, the dpi is in
dots-per-1000-inches and its unit is int32.
Change-Id: I9eed17d6f575bc05f1794dc0575f268fe1fc297d
Signed-off-by: Drew Davenport <ddavenport@google.com>
diff --git a/hwc2_device/HwcDisplay.h b/hwc2_device/HwcDisplay.h
index 9fe555d..87d2da7 100644
--- a/hwc2_device/HwcDisplay.h
+++ b/hwc2_device/HwcDisplay.h
@@ -54,6 +54,10 @@
std::string Dump();
+ const HwcDisplayConfigs &GetDisplayConfigs() const {
+ return configs_;
+ }
+
// HWC Hooks
HWC2::Error AcceptDisplayChanges();
HWC2::Error CreateLayer(hwc2_layer_t *layer);
@@ -66,7 +70,8 @@
HWC2::Error GetColorModes(uint32_t *num_modes, int32_t *modes);
HWC2::Error GetDisplayAttribute(hwc2_config_t config, int32_t attribute,
int32_t *value);
- HWC2::Error GetDisplayConfigs(uint32_t *num_configs, hwc2_config_t *configs);
+ HWC2::Error LegacyGetDisplayConfigs(uint32_t *num_configs,
+ hwc2_config_t *configs);
HWC2::Error GetDisplayName(uint32_t *size, char *name);
HWC2::Error GetDisplayRequests(int32_t *display_requests,
uint32_t *num_elements, hwc2_layer_t *layers,