summaryrefslogtreecommitdiff
path: root/libs/gui/ISurfaceComposer.cpp
diff options
context:
space:
mode:
author Alec Mouri <alecmouri@google.com> 2021-03-04 19:14:50 -0800
committer Alec Mouri <alecmouri@google.com> 2021-03-05 19:10:57 -0800
commita9a68a69e441823524c8766f529a3a54328dad53 (patch)
tree00adf36934f0b508a60f2d740f2ebace38c2de6f /libs/gui/ISurfaceComposer.cpp
parenta170ec6a87f2720eb9846ea75cd9807db54b12ad (diff)
Support task ID for fps listener rather than SurfaceControl.
Bug: 174956756 Test: e2e test with dashboard cls Change-Id: I841af53ac820a91d270a75c5cc0ca258df0a3945
Diffstat (limited to 'libs/gui/ISurfaceComposer.cpp')
-rw-r--r--libs/gui/ISurfaceComposer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index 05e19354da..989abd9a15 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -755,11 +755,10 @@ public:
return error;
}
- virtual status_t addFpsListener(const sp<IBinder>& layerHandle,
- const sp<gui::IFpsListener>& listener) {
+ virtual status_t addFpsListener(int32_t taskId, const sp<gui::IFpsListener>& listener) {
Parcel data, reply;
SAFE_PARCEL(data.writeInterfaceToken, ISurfaceComposer::getInterfaceDescriptor());
- SAFE_PARCEL(data.writeStrongBinder, layerHandle);
+ SAFE_PARCEL(data.writeInt32, taskId);
SAFE_PARCEL(data.writeStrongBinder, IInterface::asBinder(listener));
const status_t error =
remote()->transact(BnSurfaceComposer::ADD_FPS_LISTENER, data, &reply);
@@ -1669,8 +1668,8 @@ status_t BnSurfaceComposer::onTransact(
}
case ADD_FPS_LISTENER: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);
- sp<IBinder> layerHandle;
- status_t result = data.readNullableStrongBinder(&layerHandle);
+ int32_t taskId;
+ status_t result = data.readInt32(&taskId);
if (result != NO_ERROR) {
ALOGE("addFpsListener: Failed to read layer handle");
return result;
@@ -1681,7 +1680,7 @@ status_t BnSurfaceComposer::onTransact(
ALOGE("addFpsListener: Failed to read listener");
return result;
}
- return addFpsListener(layerHandle, listener);
+ return addFpsListener(taskId, listener);
}
case REMOVE_FPS_LISTENER: {
CHECK_INTERFACE(ISurfaceComposer, data, reply);