From 0a81aa312d9efa3369b31b1212b97f29f01fba74 Mon Sep 17 00:00:00 2001 From: Huihong Luo Date: Tue, 22 Feb 2022 16:02:36 -0800 Subject: Migrate getSupportedFrameTimestamps() to AIDL Note that FrameEvent is converted to AIDL enum and some external projects are updated to reflect the changes, refer to the topic for other CLs. Bug: 220935835 Test: atest libgui_test Change-Id: I576360ad0684b1b010b773a2287050c9ba2f62f --- libs/gui/ISurfaceComposer.cpp | 62 ------------------------------------------- 1 file changed, 62 deletions(-) (limited to 'libs/gui/ISurfaceComposer.cpp') diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp index a20d428345..a1375684f9 100644 --- a/libs/gui/ISurfaceComposer.cpp +++ b/libs/gui/ISurfaceComposer.cpp @@ -159,49 +159,6 @@ public: return result != 0; } - status_t getSupportedFrameTimestamps(std::vector* outSupported) const override { - if (!outSupported) { - return UNEXPECTED_NULL; - } - outSupported->clear(); - - Parcel data, reply; - - status_t err = data.writeInterfaceToken( - ISurfaceComposer::getInterfaceDescriptor()); - if (err != NO_ERROR) { - return err; - } - - err = remote()->transact( - BnSurfaceComposer::GET_SUPPORTED_FRAME_TIMESTAMPS, - data, &reply); - if (err != NO_ERROR) { - return err; - } - - int32_t result = 0; - err = reply.readInt32(&result); - if (err != NO_ERROR) { - return err; - } - if (result != NO_ERROR) { - return result; - } - - std::vector supported; - err = reply.readInt32Vector(&supported); - if (err != NO_ERROR) { - return err; - } - - outSupported->reserve(supported.size()); - for (int32_t s : supported) { - outSupported->push_back(static_cast(s)); - } - return NO_ERROR; - } - sp createDisplayEventConnection( VsyncSource vsyncSource, EventRegistrationFlags eventRegistration) override { Parcel data, reply; @@ -993,25 +950,6 @@ status_t BnSurfaceComposer::onTransact( reply->writeInt32(result); return NO_ERROR; } - case GET_SUPPORTED_FRAME_TIMESTAMPS: { - CHECK_INTERFACE(ISurfaceComposer, data, reply); - std::vector supportedTimestamps; - status_t result = getSupportedFrameTimestamps(&supportedTimestamps); - status_t err = reply->writeInt32(result); - if (err != NO_ERROR) { - return err; - } - if (result != NO_ERROR) { - return result; - } - - std::vector supported; - supported.reserve(supportedTimestamps.size()); - for (FrameEvent s : supportedTimestamps) { - supported.push_back(static_cast(s)); - } - return reply->writeInt32Vector(supported); - } case CREATE_DISPLAY_EVENT_CONNECTION: { CHECK_INTERFACE(ISurfaceComposer, data, reply); auto vsyncSource = static_cast(data.readInt32()); -- cgit v1.2.3-59-g8ed1b