Loading libs/gui/ISurfaceComposer.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; Loading @@ -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); Loading libs/gui/SurfaceComposerClient.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1982,9 +1982,9 @@ status_t SurfaceComposerClient::removeRegionSamplingListener( return ComposerService::getComposerService()->removeRegionSamplingListener(listener); } status_t SurfaceComposerClient::addFpsListener(const sp<IBinder>& layerHandle, status_t SurfaceComposerClient::addFpsListener(int32_t taskId, const sp<gui::IFpsListener>& listener) { return ComposerService::getComposerService()->addFpsListener(layerHandle, listener); return ComposerService::getComposerService()->addFpsListener(taskId, listener); } status_t SurfaceComposerClient::removeFpsListener(const sp<gui::IFpsListener>& listener) { Loading libs/gui/include/gui/ISurfaceComposer.h +5 −6 Original line number Diff line number Diff line Loading @@ -351,16 +351,15 @@ public: /* Registers a listener that streams fps updates from SurfaceFlinger. * * The listener will stream fps updates for the layer tree rooted at layerHandle. Usually, this * should be tied to a task. Layers that are not descendants of that task are out of scope for * FPS computations. * The listener will stream fps updates for the layer tree rooted at the layer denoted by the * task ID, i.e., the layer must have the task ID as part of its layer metadata with key * METADATA_TASK_ID. If there is no such layer, then no fps is expected to be reported. * * Multiple listeners may be supported. * * Requires the ACCESS_SURFACE_FLINGER permission. * Requires the READ_FRAME_BUFFER permission. */ virtual status_t addFpsListener(const sp<IBinder>& layerHandle, const sp<gui::IFpsListener>& listener) = 0; virtual status_t addFpsListener(int32_t taskId, const sp<gui::IFpsListener>& listener) = 0; /* * Removes a listener that was streaming fps updates from SurfaceFlinger. */ Loading libs/gui/include/gui/SurfaceComposerClient.h +1 −2 Original line number Diff line number Diff line Loading @@ -589,8 +589,7 @@ public: const sp<IBinder>& stopLayerHandle, const sp<IRegionSamplingListener>& listener); static status_t removeRegionSamplingListener(const sp<IRegionSamplingListener>& listener); static status_t addFpsListener(const sp<IBinder>& layerHandle, const sp<gui::IFpsListener>& listener); static status_t addFpsListener(int32_t taskId, const sp<gui::IFpsListener>& listener); static status_t removeFpsListener(const sp<gui::IFpsListener>& listener); private: Loading libs/gui/tests/Surface_test.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -824,8 +824,7 @@ public: const sp<IRegionSamplingListener>& /*listener*/) override { return NO_ERROR; } status_t addFpsListener(const sp<IBinder>& /*layerHandle*/, const sp<gui::IFpsListener>& /*listener*/) { status_t addFpsListener(int32_t /*taskId*/, const sp<gui::IFpsListener>& /*listener*/) { return NO_ERROR; } status_t removeFpsListener(const sp<gui::IFpsListener>& /*listener*/) { return NO_ERROR; } Loading Loading
libs/gui/ISurfaceComposer.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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; Loading @@ -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); Loading
libs/gui/SurfaceComposerClient.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1982,9 +1982,9 @@ status_t SurfaceComposerClient::removeRegionSamplingListener( return ComposerService::getComposerService()->removeRegionSamplingListener(listener); } status_t SurfaceComposerClient::addFpsListener(const sp<IBinder>& layerHandle, status_t SurfaceComposerClient::addFpsListener(int32_t taskId, const sp<gui::IFpsListener>& listener) { return ComposerService::getComposerService()->addFpsListener(layerHandle, listener); return ComposerService::getComposerService()->addFpsListener(taskId, listener); } status_t SurfaceComposerClient::removeFpsListener(const sp<gui::IFpsListener>& listener) { Loading
libs/gui/include/gui/ISurfaceComposer.h +5 −6 Original line number Diff line number Diff line Loading @@ -351,16 +351,15 @@ public: /* Registers a listener that streams fps updates from SurfaceFlinger. * * The listener will stream fps updates for the layer tree rooted at layerHandle. Usually, this * should be tied to a task. Layers that are not descendants of that task are out of scope for * FPS computations. * The listener will stream fps updates for the layer tree rooted at the layer denoted by the * task ID, i.e., the layer must have the task ID as part of its layer metadata with key * METADATA_TASK_ID. If there is no such layer, then no fps is expected to be reported. * * Multiple listeners may be supported. * * Requires the ACCESS_SURFACE_FLINGER permission. * Requires the READ_FRAME_BUFFER permission. */ virtual status_t addFpsListener(const sp<IBinder>& layerHandle, const sp<gui::IFpsListener>& listener) = 0; virtual status_t addFpsListener(int32_t taskId, const sp<gui::IFpsListener>& listener) = 0; /* * Removes a listener that was streaming fps updates from SurfaceFlinger. */ Loading
libs/gui/include/gui/SurfaceComposerClient.h +1 −2 Original line number Diff line number Diff line Loading @@ -589,8 +589,7 @@ public: const sp<IBinder>& stopLayerHandle, const sp<IRegionSamplingListener>& listener); static status_t removeRegionSamplingListener(const sp<IRegionSamplingListener>& listener); static status_t addFpsListener(const sp<IBinder>& layerHandle, const sp<gui::IFpsListener>& listener); static status_t addFpsListener(int32_t taskId, const sp<gui::IFpsListener>& listener); static status_t removeFpsListener(const sp<gui::IFpsListener>& listener); private: Loading
libs/gui/tests/Surface_test.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -824,8 +824,7 @@ public: const sp<IRegionSamplingListener>& /*listener*/) override { return NO_ERROR; } status_t addFpsListener(const sp<IBinder>& /*layerHandle*/, const sp<gui::IFpsListener>& /*listener*/) { status_t addFpsListener(int32_t /*taskId*/, const sp<gui::IFpsListener>& /*listener*/) { return NO_ERROR; } status_t removeFpsListener(const sp<gui::IFpsListener>& /*listener*/) { return NO_ERROR; } Loading