Loading libs/bufferqueueconverter/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ cc_library_shared { double_loadable: true, srcs: [ ":libgui_frame_event_aidl", "BufferQueueConverter.cpp", ], Loading libs/gui/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,12 @@ filegroup { path: "aidl/", } filegroup { name: "libgui_frame_event_aidl", srcs: ["aidl/android/gui/FrameEvent.aidl"], path: "aidl/", } cc_library_static { name: "libgui_aidl_static", vendor_available: true, Loading Loading @@ -405,6 +411,7 @@ cc_library_static { ], srcs: [ ":libgui_frame_event_aidl", "mock/GraphicBufferConsumer.cpp", "mock/GraphicBufferProducer.cpp", ], Loading libs/gui/ISurfaceComposer.cpp +0 −62 Original line number Diff line number Diff line Loading @@ -159,49 +159,6 @@ public: return result != 0; } status_t getSupportedFrameTimestamps(std::vector<FrameEvent>* 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<int32_t> 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<FrameEvent>(s)); } return NO_ERROR; } sp<IDisplayEventConnection> createDisplayEventConnection( VsyncSource vsyncSource, EventRegistrationFlags eventRegistration) override { Parcel data, reply; Loading Loading @@ -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<FrameEvent> 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<int32_t> supported; supported.reserve(supportedTimestamps.size()); for (FrameEvent s : supportedTimestamps) { supported.push_back(static_cast<int32_t>(s)); } return reply->writeInt32Vector(supported); } case CREATE_DISPLAY_EVENT_CONNECTION: { CHECK_INTERFACE(ISurfaceComposer, data, reply); auto vsyncSource = static_cast<ISurfaceComposer::VsyncSource>(data.readInt32()); Loading libs/gui/Surface.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1257,10 +1257,10 @@ void Surface::querySupportedTimestampsLocked() const { mQueriedSupportedTimestamps = true; std::vector<FrameEvent> supportedFrameTimestamps; status_t err = composerService()->getSupportedFrameTimestamps( &supportedFrameTimestamps); binder::Status status = composerServiceAIDL()->getSupportedFrameTimestamps(&supportedFrameTimestamps); if (err != NO_ERROR) { if (!status.isOk()) { return; } Loading libs/gui/aidl/android/gui/FrameEvent.aidl 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.gui; // Identifiers for all the events that may be recorded or reported. /** @hide */ @Backing(type="int") enum FrameEvent { POSTED = 0, REQUESTED_PRESENT = 1, LATCH = 2, ACQUIRE = 3, FIRST_REFRESH_START = 4, LAST_REFRESH_START = 5, GPU_COMPOSITION_DONE = 6, DISPLAY_PRESENT = 7, DEQUEUE_READY = 8, RELEASE = 9, EVENT_COUNT = 10 // Not an actual event. } Loading
libs/bufferqueueconverter/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ cc_library_shared { double_loadable: true, srcs: [ ":libgui_frame_event_aidl", "BufferQueueConverter.cpp", ], Loading
libs/gui/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,12 @@ filegroup { path: "aidl/", } filegroup { name: "libgui_frame_event_aidl", srcs: ["aidl/android/gui/FrameEvent.aidl"], path: "aidl/", } cc_library_static { name: "libgui_aidl_static", vendor_available: true, Loading Loading @@ -405,6 +411,7 @@ cc_library_static { ], srcs: [ ":libgui_frame_event_aidl", "mock/GraphicBufferConsumer.cpp", "mock/GraphicBufferProducer.cpp", ], Loading
libs/gui/ISurfaceComposer.cpp +0 −62 Original line number Diff line number Diff line Loading @@ -159,49 +159,6 @@ public: return result != 0; } status_t getSupportedFrameTimestamps(std::vector<FrameEvent>* 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<int32_t> 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<FrameEvent>(s)); } return NO_ERROR; } sp<IDisplayEventConnection> createDisplayEventConnection( VsyncSource vsyncSource, EventRegistrationFlags eventRegistration) override { Parcel data, reply; Loading Loading @@ -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<FrameEvent> 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<int32_t> supported; supported.reserve(supportedTimestamps.size()); for (FrameEvent s : supportedTimestamps) { supported.push_back(static_cast<int32_t>(s)); } return reply->writeInt32Vector(supported); } case CREATE_DISPLAY_EVENT_CONNECTION: { CHECK_INTERFACE(ISurfaceComposer, data, reply); auto vsyncSource = static_cast<ISurfaceComposer::VsyncSource>(data.readInt32()); Loading
libs/gui/Surface.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -1257,10 +1257,10 @@ void Surface::querySupportedTimestampsLocked() const { mQueriedSupportedTimestamps = true; std::vector<FrameEvent> supportedFrameTimestamps; status_t err = composerService()->getSupportedFrameTimestamps( &supportedFrameTimestamps); binder::Status status = composerServiceAIDL()->getSupportedFrameTimestamps(&supportedFrameTimestamps); if (err != NO_ERROR) { if (!status.isOk()) { return; } Loading
libs/gui/aidl/android/gui/FrameEvent.aidl 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright 2022 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.gui; // Identifiers for all the events that may be recorded or reported. /** @hide */ @Backing(type="int") enum FrameEvent { POSTED = 0, REQUESTED_PRESENT = 1, LATCH = 2, ACQUIRE = 3, FIRST_REFRESH_START = 4, LAST_REFRESH_START = 5, GPU_COMPOSITION_DONE = 6, DISPLAY_PRESENT = 7, DEQUEUE_READY = 8, RELEASE = 9, EVENT_COUNT = 10 // Not an actual event. }