summaryrefslogtreecommitdiff
path: root/libs/ui/DynamicDisplayInfo.cpp
diff options
context:
space:
mode:
author Marin Shalamanov <shalamanov@google.com> 2021-02-16 19:38:36 +0100
committer Marin Shalamanov <shalamanov@google.com> 2021-02-23 13:13:58 +0100
commitb173f7599a8f93786342d27167facf7eae02845e (patch)
treef13d93cfb55b70020880b458b778df40d219ab89 /libs/ui/DynamicDisplayInfo.cpp
parent228f46b5b9c3eac674aceb579a718cd459165f2e (diff)
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
Diffstat (limited to 'libs/ui/DynamicDisplayInfo.cpp')
-rw-r--r--libs/ui/DynamicDisplayInfo.cpp8
1 files changed, 7 insertions, 1 deletions
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;
}