[SF] Adds support to call notifyExpectedPresentHint
Adds the supporting code to make the call over HAL.
BUG: 296636253
BUG: 284845445
Test: m
Change-Id: I44e26affc7b179c125524351d01ea54431b51ace
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index 812621f..d6ef203 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -876,6 +876,19 @@
return NO_ERROR;
}
+status_t HWComposer::notifyExpectedPresent(PhysicalDisplayId displayId, nsecs_t expectedPresentTime,
+ int32_t frameIntervalNs) {
+ ATRACE_CALL();
+ RETURN_IF_INVALID_DISPLAY(displayId, BAD_INDEX);
+ const auto error = mComposer->notifyExpectedPresent(mDisplayData[displayId].hwcDisplay->getId(),
+ expectedPresentTime, frameIntervalNs);
+ if (error != hal::Error::NONE) {
+ ALOGE("Error in notifyExpectedPresent call %s", to_string(error).c_str());
+ return INVALID_OPERATION;
+ }
+ return NO_ERROR;
+}
+
status_t HWComposer::getDisplayDecorationSupport(
PhysicalDisplayId displayId,
std::optional<aidl::android::hardware::graphics::common::DisplayDecorationSupport>*