Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cbd3075 authored by Ady Abraham's avatar Ady Abraham
Browse files

SF: rename ExplicitEarlyWakeup -> EarlyWakeup

Bug: 159125966
Test: build
Change-Id: I3ab95491ac5fe64b0dc56290ad05bbaf7b8e5009
parent 67fba0fd
Loading
Loading
Loading
Loading
+21 −21
Original line number Diff line number Diff line
@@ -419,8 +419,8 @@ SurfaceComposerClient::Transaction::Transaction(const Transaction& other)
        mForceSynchronous(other.mForceSynchronous),
        mTransactionNestCount(other.mTransactionNestCount),
        mAnimation(other.mAnimation),
        mExplicitEarlyWakeupStart(other.mExplicitEarlyWakeupStart),
        mExplicitEarlyWakeupEnd(other.mExplicitEarlyWakeupEnd),
        mEarlyWakeupStart(other.mEarlyWakeupStart),
        mEarlyWakeupEnd(other.mEarlyWakeupEnd),
        mContainsBuffer(other.mContainsBuffer),
        mDesiredPresentTime(other.mDesiredPresentTime),
        mIsAutoTimestamp(other.mIsAutoTimestamp),
@@ -449,8 +449,8 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel
    const uint32_t forceSynchronous = parcel->readUint32();
    const uint32_t transactionNestCount = parcel->readUint32();
    const bool animation = parcel->readBool();
    const bool explicitEarlyWakeupStart = parcel->readBool();
    const bool explicitEarlyWakeupEnd = parcel->readBool();
    const bool earlyWakeupStart = parcel->readBool();
    const bool earlyWakeupEnd = parcel->readBool();
    const bool containsBuffer = parcel->readBool();
    const int64_t desiredPresentTime = parcel->readInt64();
    const bool isAutoTimestamp = parcel->readBool();
@@ -525,8 +525,8 @@ status_t SurfaceComposerClient::Transaction::readFromParcel(const Parcel* parcel
    mForceSynchronous = forceSynchronous;
    mTransactionNestCount = transactionNestCount;
    mAnimation = animation;
    mExplicitEarlyWakeupStart = explicitEarlyWakeupStart;
    mExplicitEarlyWakeupEnd = explicitEarlyWakeupEnd;
    mEarlyWakeupStart = earlyWakeupStart;
    mEarlyWakeupEnd = earlyWakeupEnd;
    mContainsBuffer = containsBuffer;
    mDesiredPresentTime = desiredPresentTime;
    mIsAutoTimestamp = isAutoTimestamp;
@@ -556,8 +556,8 @@ status_t SurfaceComposerClient::Transaction::writeToParcel(Parcel* parcel) const
    parcel->writeUint32(mForceSynchronous);
    parcel->writeUint32(mTransactionNestCount);
    parcel->writeBool(mAnimation);
    parcel->writeBool(mExplicitEarlyWakeupStart);
    parcel->writeBool(mExplicitEarlyWakeupEnd);
    parcel->writeBool(mEarlyWakeupStart);
    parcel->writeBool(mEarlyWakeupEnd);
    parcel->writeBool(mContainsBuffer);
    parcel->writeInt64(mDesiredPresentTime);
    parcel->writeBool(mIsAutoTimestamp);
@@ -635,8 +635,8 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::merge(Tr
    mInputWindowCommands.merge(other.mInputWindowCommands);

    mContainsBuffer |= other.mContainsBuffer;
    mExplicitEarlyWakeupStart = mExplicitEarlyWakeupStart || other.mExplicitEarlyWakeupStart;
    mExplicitEarlyWakeupEnd = mExplicitEarlyWakeupEnd || other.mExplicitEarlyWakeupEnd;
    mEarlyWakeupStart = mEarlyWakeupStart || other.mEarlyWakeupStart;
    mEarlyWakeupEnd = mEarlyWakeupEnd || other.mEarlyWakeupEnd;
    mApplyToken = other.mApplyToken;

    mFrameTimelineInfo.merge(other.mFrameTimelineInfo);
@@ -654,8 +654,8 @@ void SurfaceComposerClient::Transaction::clear() {
    mForceSynchronous = 0;
    mTransactionNestCount = 0;
    mAnimation = false;
    mExplicitEarlyWakeupStart = false;
    mExplicitEarlyWakeupEnd = false;
    mEarlyWakeupStart = false;
    mEarlyWakeupEnd = false;
    mDesiredPresentTime = 0;
    mIsAutoTimestamp = true;
    mFrameTimelineInfo.clear();
@@ -775,13 +775,13 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous) {
        flags |= ISurfaceComposer::eAnimation;
    }

    // If both mExplicitEarlyWakeupStart and mExplicitEarlyWakeupEnd are set
    // If both mEarlyWakeupStart and mEarlyWakeupEnd are set
    // it is equivalent for none
    if (mExplicitEarlyWakeupStart && !mExplicitEarlyWakeupEnd) {
        flags |= ISurfaceComposer::eExplicitEarlyWakeupStart;
    if (mEarlyWakeupStart && !mEarlyWakeupEnd) {
        flags |= ISurfaceComposer::eEarlyWakeupStart;
    }
    if (mExplicitEarlyWakeupEnd && !mExplicitEarlyWakeupStart) {
        flags |= ISurfaceComposer::eExplicitEarlyWakeupEnd;
    if (mEarlyWakeupEnd && !mEarlyWakeupStart) {
        flags |= ISurfaceComposer::eEarlyWakeupEnd;
    }

    sp<IBinder> applyToken = mApplyToken
@@ -832,12 +832,12 @@ void SurfaceComposerClient::Transaction::setAnimationTransaction() {
    mAnimation = true;
}

void SurfaceComposerClient::Transaction::setExplicitEarlyWakeupStart() {
    mExplicitEarlyWakeupStart = true;
void SurfaceComposerClient::Transaction::setEarlyWakeupStart() {
    mEarlyWakeupStart = true;
}

void SurfaceComposerClient::Transaction::setExplicitEarlyWakeupEnd() {
    mExplicitEarlyWakeupEnd = true;
void SurfaceComposerClient::Transaction::setEarlyWakeupEnd() {
    mEarlyWakeupEnd = true;
}

layer_state_t* SurfaceComposerClient::Transaction::getLayerState(const sp<SurfaceControl>& sc) {
+3 −3
Original line number Diff line number Diff line
@@ -93,11 +93,11 @@ public:
        // lot of layers being composed, and thus, SurfaceFlinger should wake-up earlier to avoid
        // missing frame deadlines. In this case SurfaceFlinger will wake up at
        // (sf vsync offset - debug.sf.early_phase_offset_ns). SurfaceFlinger will continue to be
        // in the early configuration until it receives eExplicitEarlyWakeupEnd. These flags are
        // in the early configuration until it receives eEarlyWakeupEnd. These flags are
        // expected to be used by WindowManager only and are guarded by
        // android.permission.ACCESS_SURFACE_FLINGER
        eExplicitEarlyWakeupStart = 0x08,
        eExplicitEarlyWakeupEnd = 0x10,
        eEarlyWakeupStart = 0x08,
        eEarlyWakeupEnd = 0x10,
    };

    enum VsyncSource {
+4 −4
Original line number Diff line number Diff line
@@ -349,8 +349,8 @@ public:
        uint32_t mForceSynchronous = 0;
        uint32_t mTransactionNestCount = 0;
        bool mAnimation = false;
        bool mExplicitEarlyWakeupStart = false;
        bool mExplicitEarlyWakeupEnd = false;
        bool mEarlyWakeupStart = false;
        bool mEarlyWakeupEnd = false;

        // Indicates that the Transaction contains a buffer that should be cached
        bool mContainsBuffer = false;
@@ -560,8 +560,8 @@ public:
                                  const Rect& layerStackRect, const Rect& displayRect);
        void setDisplaySize(const sp<IBinder>& token, uint32_t width, uint32_t height);
        void setAnimationTransaction();
        void setExplicitEarlyWakeupStart();
        void setExplicitEarlyWakeupEnd();
        void setEarlyWakeupStart();
        void setEarlyWakeupEnd();
    };

    status_t clearLayerFrameStats(const sp<IBinder>& token) const;
+9 −9
Original line number Diff line number Diff line
@@ -50,23 +50,23 @@ VsyncModulator::VsyncConfigOpt VsyncModulator::setTransactionSchedule(
        TransactionSchedule schedule) {
    switch (schedule) {
        case Schedule::EarlyStart:
            ALOGW_IF(mExplicitEarlyWakeup, "%s: Duplicate EarlyStart", __FUNCTION__);
            mExplicitEarlyWakeup = true;
            ALOGW_IF(mEarlyWakeup, "%s: Duplicate EarlyStart", __FUNCTION__);
            mEarlyWakeup = true;
            break;
        case Schedule::EarlyEnd:
            ALOGW_IF(!mExplicitEarlyWakeup, "%s: Unexpected EarlyEnd", __FUNCTION__);
            mExplicitEarlyWakeup = false;
            ALOGW_IF(!mEarlyWakeup, "%s: Unexpected EarlyEnd", __FUNCTION__);
            mEarlyWakeup = false;
            break;
        case Schedule::Late:
            // No change to mExplicitEarlyWakeup for non-explicit states.
            // No change to mEarlyWakeup for non-explicit states.
            break;
    }

    if (mTraceDetailedInfo) {
        ATRACE_INT("mExplicitEarlyWakeup", mExplicitEarlyWakeup);
        ATRACE_INT("mEarlyWakeup", mEarlyWakeup);
    }

    if (!mExplicitEarlyWakeup && schedule == Schedule::EarlyEnd) {
    if (!mEarlyWakeup && schedule == Schedule::EarlyEnd) {
        mEarlyTransactionFrames = MIN_EARLY_TRANSACTION_FRAMES;
        mEarlyTransactionStartTime = mNow();
    }
@@ -128,8 +128,8 @@ VsyncModulator::VsyncConfig VsyncModulator::getVsyncConfig() const {
const VsyncModulator::VsyncConfig& VsyncModulator::getNextVsyncConfig() const {
    // Early offsets are used if we're in the middle of a refresh rate
    // change, or if we recently begin a transaction.
    if (mExplicitEarlyWakeup || mTransactionSchedule == Schedule::EarlyEnd ||
        mEarlyTransactionFrames > 0 || mRefreshRateChangePending) {
    if (mEarlyWakeup || mTransactionSchedule == Schedule::EarlyEnd || mEarlyTransactionFrames > 0 ||
        mRefreshRateChangePending) {
        return mVsyncConfigSet.early;
    } else if (mEarlyGpuFrames > 0) {
        return mVsyncConfigSet.earlyGpu;
+1 −1
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ private:

    using Schedule = TransactionSchedule;
    std::atomic<Schedule> mTransactionSchedule = Schedule::Late;
    std::atomic<bool> mExplicitEarlyWakeup = false;
    std::atomic<bool> mEarlyWakeup = false;

    std::atomic<bool> mRefreshRateChangePending = false;

Loading