Loading libs/gui/Android.bp +3 −4 Original line number Diff line number Diff line Loading @@ -89,13 +89,12 @@ cc_library_headers { filegroup { name: "guiconstants_aidl", srcs: [ "android/gui/BorderSettings.aidl", "android/gui/BoxShadowSettings.aidl", "android/gui/DropInputMode.aidl", "android/gui/EarlyWakeupInfo.aidl", "android/gui/StalledTransactionInfo.aidl", "android/**/TouchOcclusionMode.aidl", "android/gui/TrustedOverlay.aidl", "android/gui/BorderSettings.aidl", "android/gui/BoxShadowSettings.aidl", ], } Loading libs/gui/ISurfaceComposer.cpp +2 −9 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ public: InputWindowCommands commands, int64_t desiredPresentTime, bool isAutoTimestamp, const std::vector<client_cache_t>& uncacheBuffers, bool hasListenerCallbacks, const std::vector<ListenerCallbacks>& listenerCallbacks, uint64_t transactionId, const std::vector<uint64_t>& mergedTransactionIds, const gui::EarlyWakeupInfo& earlyWakeupInfo) override { const std::vector<uint64_t>& mergedTransactionIds) override { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); Loading Loading @@ -108,8 +107,6 @@ public: SAFE_PARCEL(data.writeUint64, mergedTransactionId); } earlyWakeupInfo.writeToParcel(&data); if (flags & ISurfaceComposer::eOneWay) { return remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE, data, &reply, IBinder::FLAG_ONEWAY); Loading Loading @@ -200,14 +197,10 @@ status_t BnSurfaceComposer::onTransact( SAFE_PARCEL(data.readUint64, &mergedTransactions[i]); } gui::EarlyWakeupInfo earlyWakeupInfo; earlyWakeupInfo.readFromParcel(&data); return setTransactionState(frameTimelineInfo, state, displays, stateFlags, applyToken, std::move(inputWindowCommands), desiredPresentTime, isAutoTimestamp, uncacheBuffers, hasListenerCallbacks, listenerCallbacks, transactionId, mergedTransactions, earlyWakeupInfo); listenerCallbacks, transactionId, mergedTransactions); } case GET_SCHEDULING_POLICY: { gui::SchedulingPolicy policy; Loading libs/gui/SurfaceComposerClient.cpp +8 −24 Original line number Diff line number Diff line Loading @@ -836,8 +836,7 @@ SurfaceComposerClient::Transaction::Transaction(const Transaction& other) mDesiredPresentTime(other.mDesiredPresentTime), mIsAutoTimestamp(other.mIsAutoTimestamp), mFrameTimelineInfo(other.mFrameTimelineInfo), mApplyToken(other.mApplyToken), mEarlyWakeupInfo(other.mEarlyWakeupInfo) { mApplyToken(other.mApplyToken) { mDisplayStates = other.mDisplayStates; mComposerStates = other.mComposerStates; mInputWindowCommands = other.mInputWindowCommands; Loading Loading @@ -959,9 +958,6 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel SAFE_PARCEL(parcel->readUint64, &mergedTransactionIds[i]); } gui::EarlyWakeupInfo earlyWakeupInfo; earlyWakeupInfo.readFromParcel(parcel); // Parsing was successful. Update the object. mId = transactionId; mFlags = flags; Loading @@ -975,7 +971,6 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel mApplyToken = applyToken; mUncacheBuffers = std::move(uncacheBuffers); mMergedTransactionIds = std::move(mergedTransactionIds); mEarlyWakeupInfo = earlyWakeupInfo; return NO_ERROR; } Loading Loading @@ -1036,8 +1031,6 @@ status_t SurfaceComposerClient::Transaction::writeToParcel(Parcel* parcel) const SAFE_PARCEL(parcel->writeUint64, mergedTransactionId); } mEarlyWakeupInfo.writeToParcel(parcel); return NO_ERROR; } Loading Loading @@ -1147,8 +1140,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr "Transaction %" PRIu64 " merged with transaction %" PRIu64, other.getId(), mId); } mEarlyWakeupInfo = other.mEarlyWakeupInfo; other.clear(); return *this; } Loading @@ -1167,7 +1158,6 @@ void SurfaceComposerClient::Transaction::clear() { mMergedTransactionIds.clear(); mLogCallPoints = false; mFlags = 0; mEarlyWakeupInfo = {}; } uint64_t SurfaceComposerClient::Transaction::getId() { Loading @@ -1186,11 +1176,10 @@ void SurfaceComposerClient::doUncacheBufferTransaction(uint64_t cacheId) { uncacheBuffer.id = cacheId; Vector<ComposerState> composerStates; Vector<DisplayState> displayStates; status_t status = sf->setTransactionState(FrameTimelineInfo{}, composerStates, displayStates, ISurfaceComposer::eOneWay, Transaction::getDefaultApplyToken(), {}, systemTime(), true, {uncacheBuffer}, false, {}, generateId(), {}, {}); status_t status = sf->setTransactionState(FrameTimelineInfo{}, composerStates, displayStates, ISurfaceComposer::eOneWay, Transaction::getDefaultApplyToken(), {}, systemTime(), true, {uncacheBuffer}, false, {}, generateId(), {}); if (status != NO_ERROR) { ALOGE_AND_TRACE("SurfaceComposerClient::doUncacheBufferTransaction - %s", strerror(-status)); Loading Loading @@ -1351,8 +1340,7 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay sf->setTransactionState(mFrameTimelineInfo, mComposerStates, mDisplayStates, mFlags, applyToken, mInputWindowCommands, mDesiredPresentTime, mIsAutoTimestamp, mUncacheBuffers, hasListenerCallbacks, listenerCallbacks, mId, mMergedTransactionIds, mEarlyWakeupInfo); listenerCallbacks, mId, mMergedTransactionIds); mId = generateId(); // Clear the current states and flags Loading Loading @@ -1459,15 +1447,11 @@ void SurfaceComposerClient::Transaction::setAnimationTransaction() { mFlags |= ISurfaceComposer::eAnimation; } void SurfaceComposerClient::Transaction::setEarlyWakeupStart( const gui::EarlyWakeupInfo& earlyWakeupInfo) { mEarlyWakeupInfo = earlyWakeupInfo; void SurfaceComposerClient::Transaction::setEarlyWakeupStart() { mFlags |= ISurfaceComposer::eEarlyWakeupStart; } void SurfaceComposerClient::Transaction::setEarlyWakeupEnd( const gui::EarlyWakeupInfo& earlyWakeupInfo) { mEarlyWakeupInfo = earlyWakeupInfo; void SurfaceComposerClient::Transaction::setEarlyWakeupEnd() { mFlags |= ISurfaceComposer::eEarlyWakeupEnd; } Loading libs/gui/TransactionState.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ status_t TransactionState::writeToParcel(Parcel* parcel) const { SAFE_PARCEL(parcel->writeStrongBinder, mApplyToken); SAFE_PARCEL(parcel->writeBool, mMayContainBuffer); SAFE_PARCEL(parcel->writeBool, mLogCallPoints); mEarlyWakeupInfo.writeToParcel(parcel); SAFE_PARCEL(parcel->writeUint32, static_cast<uint32_t>(mDisplayStates.size())); for (auto const& displayState : mDisplayStates) { Loading Loading @@ -74,7 +73,6 @@ status_t TransactionState::readFromParcel(const Parcel* parcel) { SAFE_PARCEL(parcel->readNullableStrongBinder, &mApplyToken); SAFE_PARCEL(parcel->readBool, &mMayContainBuffer); SAFE_PARCEL(parcel->readBool, &mLogCallPoints); mEarlyWakeupInfo.readFromParcel(parcel); uint32_t count; SAFE_PARCEL_READ_SIZE(parcel->readUint32, &count, parcel->dataSize()) Loading Loading @@ -196,7 +194,6 @@ void TransactionState::merge(TransactionState&& other, // mApplyToken is explicitly not merged. Token should be set before applying the transactions to // make synchronization decisions a bit simpler. mergeFrameTimelineInfo(other.mFrameTimelineInfo); mEarlyWakeupInfo = other.mEarlyWakeupInfo; other.clear(); } Loading Loading @@ -228,7 +225,6 @@ void TransactionState::clear() { mFlags = 0; mMayContainBuffer = false; mLogCallPoints = false; mEarlyWakeupInfo = {}; } layer_state_t* TransactionState::getLayerState(const sp<SurfaceControl>& sc) { Loading libs/gui/android/gui/EarlyWakeupInfo.aidldeleted 100644 → 0 +0 −25 Original line number Diff line number Diff line /** * Copyright (c) 2025, 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; import android.os.IBinder; /** @hide */ parcelable EarlyWakeupInfo { @nullable IBinder token; @utf8InCpp String trace = "<no trace>"; } Loading
libs/gui/Android.bp +3 −4 Original line number Diff line number Diff line Loading @@ -89,13 +89,12 @@ cc_library_headers { filegroup { name: "guiconstants_aidl", srcs: [ "android/gui/BorderSettings.aidl", "android/gui/BoxShadowSettings.aidl", "android/gui/DropInputMode.aidl", "android/gui/EarlyWakeupInfo.aidl", "android/gui/StalledTransactionInfo.aidl", "android/**/TouchOcclusionMode.aidl", "android/gui/TrustedOverlay.aidl", "android/gui/BorderSettings.aidl", "android/gui/BoxShadowSettings.aidl", ], } Loading
libs/gui/ISurfaceComposer.cpp +2 −9 Original line number Diff line number Diff line Loading @@ -66,8 +66,7 @@ public: InputWindowCommands commands, int64_t desiredPresentTime, bool isAutoTimestamp, const std::vector<client_cache_t>& uncacheBuffers, bool hasListenerCallbacks, const std::vector<ListenerCallbacks>& listenerCallbacks, uint64_t transactionId, const std::vector<uint64_t>& mergedTransactionIds, const gui::EarlyWakeupInfo& earlyWakeupInfo) override { const std::vector<uint64_t>& mergedTransactionIds) override { Parcel data, reply; data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor()); Loading Loading @@ -108,8 +107,6 @@ public: SAFE_PARCEL(data.writeUint64, mergedTransactionId); } earlyWakeupInfo.writeToParcel(&data); if (flags & ISurfaceComposer::eOneWay) { return remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE, data, &reply, IBinder::FLAG_ONEWAY); Loading Loading @@ -200,14 +197,10 @@ status_t BnSurfaceComposer::onTransact( SAFE_PARCEL(data.readUint64, &mergedTransactions[i]); } gui::EarlyWakeupInfo earlyWakeupInfo; earlyWakeupInfo.readFromParcel(&data); return setTransactionState(frameTimelineInfo, state, displays, stateFlags, applyToken, std::move(inputWindowCommands), desiredPresentTime, isAutoTimestamp, uncacheBuffers, hasListenerCallbacks, listenerCallbacks, transactionId, mergedTransactions, earlyWakeupInfo); listenerCallbacks, transactionId, mergedTransactions); } case GET_SCHEDULING_POLICY: { gui::SchedulingPolicy policy; Loading
libs/gui/SurfaceComposerClient.cpp +8 −24 Original line number Diff line number Diff line Loading @@ -836,8 +836,7 @@ SurfaceComposerClient::Transaction::Transaction(const Transaction& other) mDesiredPresentTime(other.mDesiredPresentTime), mIsAutoTimestamp(other.mIsAutoTimestamp), mFrameTimelineInfo(other.mFrameTimelineInfo), mApplyToken(other.mApplyToken), mEarlyWakeupInfo(other.mEarlyWakeupInfo) { mApplyToken(other.mApplyToken) { mDisplayStates = other.mDisplayStates; mComposerStates = other.mComposerStates; mInputWindowCommands = other.mInputWindowCommands; Loading Loading @@ -959,9 +958,6 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel SAFE_PARCEL(parcel->readUint64, &mergedTransactionIds[i]); } gui::EarlyWakeupInfo earlyWakeupInfo; earlyWakeupInfo.readFromParcel(parcel); // Parsing was successful. Update the object. mId = transactionId; mFlags = flags; Loading @@ -975,7 +971,6 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel mApplyToken = applyToken; mUncacheBuffers = std::move(uncacheBuffers); mMergedTransactionIds = std::move(mergedTransactionIds); mEarlyWakeupInfo = earlyWakeupInfo; return NO_ERROR; } Loading Loading @@ -1036,8 +1031,6 @@ status_t SurfaceComposerClient::Transaction::writeToParcel(Parcel* parcel) const SAFE_PARCEL(parcel->writeUint64, mergedTransactionId); } mEarlyWakeupInfo.writeToParcel(parcel); return NO_ERROR; } Loading Loading @@ -1147,8 +1140,6 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr "Transaction %" PRIu64 " merged with transaction %" PRIu64, other.getId(), mId); } mEarlyWakeupInfo = other.mEarlyWakeupInfo; other.clear(); return *this; } Loading @@ -1167,7 +1158,6 @@ void SurfaceComposerClient::Transaction::clear() { mMergedTransactionIds.clear(); mLogCallPoints = false; mFlags = 0; mEarlyWakeupInfo = {}; } uint64_t SurfaceComposerClient::Transaction::getId() { Loading @@ -1186,11 +1176,10 @@ void SurfaceComposerClient::doUncacheBufferTransaction(uint64_t cacheId) { uncacheBuffer.id = cacheId; Vector<ComposerState> composerStates; Vector<DisplayState> displayStates; status_t status = sf->setTransactionState(FrameTimelineInfo{}, composerStates, displayStates, ISurfaceComposer::eOneWay, Transaction::getDefaultApplyToken(), {}, systemTime(), true, {uncacheBuffer}, false, {}, generateId(), {}, {}); status_t status = sf->setTransactionState(FrameTimelineInfo{}, composerStates, displayStates, ISurfaceComposer::eOneWay, Transaction::getDefaultApplyToken(), {}, systemTime(), true, {uncacheBuffer}, false, {}, generateId(), {}); if (status != NO_ERROR) { ALOGE_AND_TRACE("SurfaceComposerClient::doUncacheBufferTransaction - %s", strerror(-status)); Loading Loading @@ -1351,8 +1340,7 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay sf->setTransactionState(mFrameTimelineInfo, mComposerStates, mDisplayStates, mFlags, applyToken, mInputWindowCommands, mDesiredPresentTime, mIsAutoTimestamp, mUncacheBuffers, hasListenerCallbacks, listenerCallbacks, mId, mMergedTransactionIds, mEarlyWakeupInfo); listenerCallbacks, mId, mMergedTransactionIds); mId = generateId(); // Clear the current states and flags Loading Loading @@ -1459,15 +1447,11 @@ void SurfaceComposerClient::Transaction::setAnimationTransaction() { mFlags |= ISurfaceComposer::eAnimation; } void SurfaceComposerClient::Transaction::setEarlyWakeupStart( const gui::EarlyWakeupInfo& earlyWakeupInfo) { mEarlyWakeupInfo = earlyWakeupInfo; void SurfaceComposerClient::Transaction::setEarlyWakeupStart() { mFlags |= ISurfaceComposer::eEarlyWakeupStart; } void SurfaceComposerClient::Transaction::setEarlyWakeupEnd( const gui::EarlyWakeupInfo& earlyWakeupInfo) { mEarlyWakeupInfo = earlyWakeupInfo; void SurfaceComposerClient::Transaction::setEarlyWakeupEnd() { mFlags |= ISurfaceComposer::eEarlyWakeupEnd; } Loading
libs/gui/TransactionState.cpp +0 −4 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ status_t TransactionState::writeToParcel(Parcel* parcel) const { SAFE_PARCEL(parcel->writeStrongBinder, mApplyToken); SAFE_PARCEL(parcel->writeBool, mMayContainBuffer); SAFE_PARCEL(parcel->writeBool, mLogCallPoints); mEarlyWakeupInfo.writeToParcel(parcel); SAFE_PARCEL(parcel->writeUint32, static_cast<uint32_t>(mDisplayStates.size())); for (auto const& displayState : mDisplayStates) { Loading Loading @@ -74,7 +73,6 @@ status_t TransactionState::readFromParcel(const Parcel* parcel) { SAFE_PARCEL(parcel->readNullableStrongBinder, &mApplyToken); SAFE_PARCEL(parcel->readBool, &mMayContainBuffer); SAFE_PARCEL(parcel->readBool, &mLogCallPoints); mEarlyWakeupInfo.readFromParcel(parcel); uint32_t count; SAFE_PARCEL_READ_SIZE(parcel->readUint32, &count, parcel->dataSize()) Loading Loading @@ -196,7 +194,6 @@ void TransactionState::merge(TransactionState&& other, // mApplyToken is explicitly not merged. Token should be set before applying the transactions to // make synchronization decisions a bit simpler. mergeFrameTimelineInfo(other.mFrameTimelineInfo); mEarlyWakeupInfo = other.mEarlyWakeupInfo; other.clear(); } Loading Loading @@ -228,7 +225,6 @@ void TransactionState::clear() { mFlags = 0; mMayContainBuffer = false; mLogCallPoints = false; mEarlyWakeupInfo = {}; } layer_state_t* TransactionState::getLayerState(const sp<SurfaceControl>& sc) { Loading
libs/gui/android/gui/EarlyWakeupInfo.aidldeleted 100644 → 0 +0 −25 Original line number Diff line number Diff line /** * Copyright (c) 2025, 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; import android.os.IBinder; /** @hide */ parcelable EarlyWakeupInfo { @nullable IBinder token; @utf8InCpp String trace = "<no trace>"; }