From b173f7599a8f93786342d27167facf7eae02845e Mon Sep 17 00:00:00 2001 From: Marin Shalamanov Date: Tue, 16 Feb 2021 19:38:36 +0100 Subject: SF: Move ALLM and GameContentType to DynamicDisplayInfo ALLM and Game content type support may change after a hotplug, for that reason we move them to DynamicDisplayInfo. Bug: 180108954 Test: flash a device and manually test that the values are properly piped to DisplayManager Change-Id: I05810c620b241e204d2c01618bb8a4069c41d32d --- libs/ui/DynamicDisplayInfo.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libs/ui/DynamicDisplayInfo.cpp') diff --git a/libs/ui/DynamicDisplayInfo.cpp b/libs/ui/DynamicDisplayInfo.cpp index 11acdae921..d5c4ef0c17 100644 --- a/libs/ui/DynamicDisplayInfo.cpp +++ b/libs/ui/DynamicDisplayInfo.cpp @@ -39,7 +39,9 @@ size_t DynamicDisplayInfo::getFlattenedSize() const { FlattenableHelpers::getFlattenedSize(activeDisplayModeId) + FlattenableHelpers::getFlattenedSize(supportedColorModes) + FlattenableHelpers::getFlattenedSize(activeColorMode) + - FlattenableHelpers::getFlattenedSize(hdrCapabilities); + FlattenableHelpers::getFlattenedSize(hdrCapabilities) + + FlattenableHelpers::getFlattenedSize(autoLowLatencyModeSupported) + + FlattenableHelpers::getFlattenedSize(gameContentTypeSupported); } status_t DynamicDisplayInfo::flatten(void* buffer, size_t size) const { @@ -51,6 +53,8 @@ status_t DynamicDisplayInfo::flatten(void* buffer, size_t size) const { RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, supportedColorModes)); RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, activeColorMode)); RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, hdrCapabilities)); + RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, autoLowLatencyModeSupported)); + RETURN_IF_ERROR(FlattenableHelpers::flatten(&buffer, &size, gameContentTypeSupported)); return OK; } @@ -60,6 +64,8 @@ status_t DynamicDisplayInfo::unflatten(const void* buffer, size_t size) { RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &supportedColorModes)); RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &activeColorMode)); RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &hdrCapabilities)); + RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &autoLowLatencyModeSupported)); + RETURN_IF_ERROR(FlattenableHelpers::unflatten(&buffer, &size, &gameContentTypeSupported)); return OK; } -- cgit v1.2.3-59-g8ed1b