Loading data/etc/go_handheld_core_hardware.xml +1 −1 Original line number Diff line number Diff line u<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2018 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); Loading libs/dumputils/dump_utils.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ static const char* debuggable_native_processes_to_dump[] = { /* list of hal interface to dump containing process during native dumps */ static const char* hal_interfaces_to_dump[] { "android.hardware.audio@2.0::IDevicesFactory", "android.hardware.audio@4.0::IDevicesFactory", "android.hardware.audio@5.0::IDevicesFactory", "android.hardware.audio@6.0::IDevicesFactory", Loading libs/gui/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ cc_library_shared { srcs: [ ":framework_native_aidl", ":inputconstants_aidl", ":libgui_aidl", ":libgui_bufferqueue_sources", Loading @@ -62,6 +63,7 @@ cc_library_shared { "DebugEGLImageTracker.cpp", "DisplayEventDispatcher.cpp", "DisplayEventReceiver.cpp", "FrameTimelineInfo.cpp", "GLConsumer.cpp", "IConsumerListener.cpp", "IDisplayEventConnection.cpp", Loading Loading @@ -154,6 +156,7 @@ cc_library_static { defaults: ["libgui_bufferqueue-defaults"], srcs: [ ":inputconstants_aidl", ":libgui_aidl", ":libgui_bufferqueue_sources", ], Loading libs/gui/BLASTBufferQueue.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -370,9 +370,9 @@ void BLASTBufferQueue::processNextBufferLocked(bool useNextTransaction) { } t->setFrameNumber(mSurfaceControl, bufferItem.mFrameNumber); if (!mNextFrameTimelineVsyncIdQueue.empty()) { t->setFrameTimelineVsync(mSurfaceControl, mNextFrameTimelineVsyncIdQueue.front()); mNextFrameTimelineVsyncIdQueue.pop(); if (!mNextFrameTimelineInfoQueue.empty()) { t->setFrameTimelineInfo(mSurfaceControl, mNextFrameTimelineInfoQueue.front()); mNextFrameTimelineInfoQueue.pop(); } if (mAutoRefresh != bufferItem.mAutoRefresh) { Loading Loading @@ -534,8 +534,8 @@ public: return mBbq->setFrameRate(frameRate, compatibility, shouldBeSeamless); } status_t setFrameTimelineVsync(int64_t frameTimelineVsyncId) override { return mBbq->setFrameTimelineVsync(frameTimelineVsyncId); status_t setFrameTimelineInfo(const FrameTimelineInfo& frameTimelineInfo) override { return mBbq->setFrameTimelineInfo(frameTimelineInfo); } }; Loading @@ -549,9 +549,9 @@ status_t BLASTBufferQueue::setFrameRate(float frameRate, int8_t compatibility, return t.setFrameRate(mSurfaceControl, frameRate, compatibility, shouldBeSeamless).apply(); } status_t BLASTBufferQueue::setFrameTimelineVsync(int64_t frameTimelineVsyncId) { status_t BLASTBufferQueue::setFrameTimelineInfo(const FrameTimelineInfo& frameTimelineInfo) { std::unique_lock _lock{mMutex}; mNextFrameTimelineVsyncIdQueue.push(frameTimelineVsyncId); mNextFrameTimelineInfoQueue.push(frameTimelineInfo); return OK; } Loading libs/gui/FrameTimelineInfo.cpp 0 → 100644 +62 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 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. */ #define LOG_TAG "FrameTimelineInfo" #include <inttypes.h> #include <android/os/IInputConstants.h> #include <gui/FrameTimelineInfo.h> #include <gui/LayerState.h> #include <utils/Errors.h> #include <cmath> using android::os::IInputConstants; namespace android { status_t FrameTimelineInfo::write(Parcel& output) const { SAFE_PARCEL(output.writeInt64, vsyncId); SAFE_PARCEL(output.writeInt32, inputEventId); return NO_ERROR; } status_t FrameTimelineInfo::read(const Parcel& input) { SAFE_PARCEL(input.readInt64, &vsyncId); SAFE_PARCEL(input.readInt32, &inputEventId); return NO_ERROR; } void FrameTimelineInfo::merge(const FrameTimelineInfo& other) { // When merging vsync Ids we take the oldest valid one if (vsyncId != INVALID_VSYNC_ID && other.vsyncId != INVALID_VSYNC_ID) { if (other.vsyncId > vsyncId) { vsyncId = other.vsyncId; inputEventId = other.inputEventId; } } else if (vsyncId == INVALID_VSYNC_ID) { vsyncId = other.vsyncId; inputEventId = other.inputEventId; } } void FrameTimelineInfo::clear() { vsyncId = INVALID_VSYNC_ID; inputEventId = IInputConstants::INVALID_INPUT_EVENT_ID; } }; // namespace android Loading
data/etc/go_handheld_core_hardware.xml +1 −1 Original line number Diff line number Diff line u<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2018 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); Loading
libs/dumputils/dump_utils.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -53,7 +53,6 @@ static const char* debuggable_native_processes_to_dump[] = { /* list of hal interface to dump containing process during native dumps */ static const char* hal_interfaces_to_dump[] { "android.hardware.audio@2.0::IDevicesFactory", "android.hardware.audio@4.0::IDevicesFactory", "android.hardware.audio@5.0::IDevicesFactory", "android.hardware.audio@6.0::IDevicesFactory", Loading
libs/gui/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ cc_library_shared { srcs: [ ":framework_native_aidl", ":inputconstants_aidl", ":libgui_aidl", ":libgui_bufferqueue_sources", Loading @@ -62,6 +63,7 @@ cc_library_shared { "DebugEGLImageTracker.cpp", "DisplayEventDispatcher.cpp", "DisplayEventReceiver.cpp", "FrameTimelineInfo.cpp", "GLConsumer.cpp", "IConsumerListener.cpp", "IDisplayEventConnection.cpp", Loading Loading @@ -154,6 +156,7 @@ cc_library_static { defaults: ["libgui_bufferqueue-defaults"], srcs: [ ":inputconstants_aidl", ":libgui_aidl", ":libgui_bufferqueue_sources", ], Loading
libs/gui/BLASTBufferQueue.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -370,9 +370,9 @@ void BLASTBufferQueue::processNextBufferLocked(bool useNextTransaction) { } t->setFrameNumber(mSurfaceControl, bufferItem.mFrameNumber); if (!mNextFrameTimelineVsyncIdQueue.empty()) { t->setFrameTimelineVsync(mSurfaceControl, mNextFrameTimelineVsyncIdQueue.front()); mNextFrameTimelineVsyncIdQueue.pop(); if (!mNextFrameTimelineInfoQueue.empty()) { t->setFrameTimelineInfo(mSurfaceControl, mNextFrameTimelineInfoQueue.front()); mNextFrameTimelineInfoQueue.pop(); } if (mAutoRefresh != bufferItem.mAutoRefresh) { Loading Loading @@ -534,8 +534,8 @@ public: return mBbq->setFrameRate(frameRate, compatibility, shouldBeSeamless); } status_t setFrameTimelineVsync(int64_t frameTimelineVsyncId) override { return mBbq->setFrameTimelineVsync(frameTimelineVsyncId); status_t setFrameTimelineInfo(const FrameTimelineInfo& frameTimelineInfo) override { return mBbq->setFrameTimelineInfo(frameTimelineInfo); } }; Loading @@ -549,9 +549,9 @@ status_t BLASTBufferQueue::setFrameRate(float frameRate, int8_t compatibility, return t.setFrameRate(mSurfaceControl, frameRate, compatibility, shouldBeSeamless).apply(); } status_t BLASTBufferQueue::setFrameTimelineVsync(int64_t frameTimelineVsyncId) { status_t BLASTBufferQueue::setFrameTimelineInfo(const FrameTimelineInfo& frameTimelineInfo) { std::unique_lock _lock{mMutex}; mNextFrameTimelineVsyncIdQueue.push(frameTimelineVsyncId); mNextFrameTimelineInfoQueue.push(frameTimelineInfo); return OK; } Loading
libs/gui/FrameTimelineInfo.cpp 0 → 100644 +62 −0 Original line number Diff line number Diff line /* * Copyright (C) 2021 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. */ #define LOG_TAG "FrameTimelineInfo" #include <inttypes.h> #include <android/os/IInputConstants.h> #include <gui/FrameTimelineInfo.h> #include <gui/LayerState.h> #include <utils/Errors.h> #include <cmath> using android::os::IInputConstants; namespace android { status_t FrameTimelineInfo::write(Parcel& output) const { SAFE_PARCEL(output.writeInt64, vsyncId); SAFE_PARCEL(output.writeInt32, inputEventId); return NO_ERROR; } status_t FrameTimelineInfo::read(const Parcel& input) { SAFE_PARCEL(input.readInt64, &vsyncId); SAFE_PARCEL(input.readInt32, &inputEventId); return NO_ERROR; } void FrameTimelineInfo::merge(const FrameTimelineInfo& other) { // When merging vsync Ids we take the oldest valid one if (vsyncId != INVALID_VSYNC_ID && other.vsyncId != INVALID_VSYNC_ID) { if (other.vsyncId > vsyncId) { vsyncId = other.vsyncId; inputEventId = other.inputEventId; } } else if (vsyncId == INVALID_VSYNC_ID) { vsyncId = other.vsyncId; inputEventId = other.inputEventId; } } void FrameTimelineInfo::clear() { vsyncId = INVALID_VSYNC_ID; inputEventId = IInputConstants::INVALID_INPUT_EVENT_ID; } }; // namespace android