summaryrefslogtreecommitdiff
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2023-09-27 19:15:08 -0700
committer Ady Abraham <adyabr@google.com> 2023-10-02 19:03:52 +0000
commit07d03c4d260b804c07f7ac927515b26c84c9a4ea (patch)
treeb0063a63627e1f66177597807523035c4bc4698d /libs/gui/ISurfaceComposer.cpp
parentaefb330cc0317bdd18d5bbc5ea51cf00ecabf66b (diff)
SF: fix binder thread priority
Add setMinSchedulerPolicy to all binder interfaces SF exposes. It was missing from gui::ISurfaceComposer and gui::IDisplayEventConnection. Test: presubmit Bug: 299378819 Change-Id: Ia0d99efa5a3bc58625c320d4df3c08bb597d2e38
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r--libs/gui/ISurfaceComposer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index b526a6c92c..ff6b558d41 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -25,6 +25,7 @@
#include <gui/IGraphicBufferProducer.h>
#include <gui/ISurfaceComposer.h>
#include <gui/LayerState.h>
+#include <gui/SchedulingPolicy.h>
#include <private/gui/ParcelUtils.h>
#include <stdint.h>
#include <sys/types.h>
@@ -201,6 +202,18 @@ status_t BnSurfaceComposer::onTransact(
isAutoTimestamp, uncacheBuffers, hasListenerCallbacks,
listenerCallbacks, transactionId, mergedTransactions);
}
+ case GET_SCHEDULING_POLICY: {
+ gui::SchedulingPolicy policy;
+ const auto status = gui::getSchedulingPolicy(&policy);
+ if (!status.isOk()) {
+ return status.exceptionCode();
+ }
+
+ SAFE_PARCEL(reply->writeInt32, policy.policy);
+ SAFE_PARCEL(reply->writeInt32, policy.priority);
+ return NO_ERROR;
+ }
+
default: {
return BBinder::onTransact(code, data, reply, flags);
}