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

Commit 8f2aff4e authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8269650 from 14d66d12 to tm-d1-release

Change-Id: Ibb00dd8c28106dc27c8009e7ff4f2a1ff626bd45
parents 62b7aad7 14d66d12
Loading
Loading
Loading
Loading
+15 −5
Original line number Original line Diff line number Diff line
@@ -182,7 +182,8 @@ BLASTBufferQueue::~BLASTBufferQueue() {
             static_cast<uint32_t>(mPendingTransactions.size()));
             static_cast<uint32_t>(mPendingTransactions.size()));
    SurfaceComposerClient::Transaction t;
    SurfaceComposerClient::Transaction t;
    mergePendingTransactions(&t, std::numeric_limits<uint64_t>::max() /* frameNumber */);
    mergePendingTransactions(&t, std::numeric_limits<uint64_t>::max() /* frameNumber */);
    t.setApplyToken(mApplyToken).apply();
    // All transactions on our apply token are one-way. See comment on mAppliedLastTransaction
    t.setApplyToken(mApplyToken).apply(false, true);
}
}


void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, uint32_t height,
void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width, uint32_t height,
@@ -230,7 +231,8 @@ void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, uint32_t width,
        }
        }
    }
    }
    if (applyTransaction) {
    if (applyTransaction) {
        t.setApplyToken(mApplyToken).apply();
        // All transactions on our apply token are one-way. See comment on mAppliedLastTransaction
        t.setApplyToken(mApplyToken).apply(false, true);
    }
    }
}
}


@@ -551,7 +553,13 @@ void BLASTBufferQueue::acquireNextBufferLocked(


    mergePendingTransactions(t, bufferItem.mFrameNumber);
    mergePendingTransactions(t, bufferItem.mFrameNumber);
    if (applyTransaction) {
    if (applyTransaction) {
        t->setApplyToken(mApplyToken).apply();
        // All transactions on our apply token are one-way. See comment on mAppliedLastTransaction
        t->setApplyToken(mApplyToken).apply(false, true);
        mAppliedLastTransaction = true;
        mLastAppliedFrameNumber = bufferItem.mFrameNumber;
    } else {
        t->setBufferHasBarrier(mSurfaceControl, mLastAppliedFrameNumber);
        mAppliedLastTransaction = false;
    }
    }


    BQA_LOGV("acquireNextBufferLocked size=%dx%d mFrameNumber=%" PRIu64
    BQA_LOGV("acquireNextBufferLocked size=%dx%d mFrameNumber=%" PRIu64
@@ -857,7 +865,8 @@ void BLASTBufferQueue::applyPendingTransactions(uint64_t frameNumber) {


    SurfaceComposerClient::Transaction t;
    SurfaceComposerClient::Transaction t;
    mergePendingTransactions(&t, frameNumber);
    mergePendingTransactions(&t, frameNumber);
    t.setApplyToken(mApplyToken).apply();
    // All transactions on our apply token are one-way. See comment on mAppliedLastTransaction
    t.setApplyToken(mApplyToken).apply(false, true);
}
}


void BLASTBufferQueue::mergePendingTransactions(SurfaceComposerClient::Transaction* t,
void BLASTBufferQueue::mergePendingTransactions(SurfaceComposerClient::Transaction* t,
@@ -1050,7 +1059,8 @@ void BLASTBufferQueue::abandon() {
                 static_cast<uint32_t>(mPendingTransactions.size()));
                 static_cast<uint32_t>(mPendingTransactions.size()));
        SurfaceComposerClient::Transaction t;
        SurfaceComposerClient::Transaction t;
        mergePendingTransactions(&t, std::numeric_limits<uint64_t>::max() /* frameNumber */);
        mergePendingTransactions(&t, std::numeric_limits<uint64_t>::max() /* frameNumber */);
        t.setApplyToken(mApplyToken).apply();
        // All transactions on our apply token are one-way. See comment on mAppliedLastTransaction
        t.setApplyToken(mApplyToken).apply(false, true);
    }
    }


    // Clear sync states
    // Clear sync states
+7 −1
Original line number Original line Diff line number Diff line
@@ -111,7 +111,13 @@ public:


        SAFE_PARCEL(data.writeUint64, transactionId);
        SAFE_PARCEL(data.writeUint64, transactionId);


        return remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE, data, &reply);
        if (flags & ISurfaceComposer::eOneWay) {
            return remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE,
                    data, &reply, IBinder::FLAG_ONEWAY);
        } else {
            return remote()->transact(BnSurfaceComposer::SET_TRANSACTION_STATE,
                    data, &reply);
        }
    }
    }


    void bootFinished() override {
    void bootFinished() override {
+5 −0
Original line number Original line Diff line number Diff line
@@ -796,6 +796,8 @@ status_t BufferData::writeToParcel(Parcel* output) const {


    SAFE_PARCEL(output->writeStrongBinder, cachedBuffer.token.promote());
    SAFE_PARCEL(output->writeStrongBinder, cachedBuffer.token.promote());
    SAFE_PARCEL(output->writeUint64, cachedBuffer.id);
    SAFE_PARCEL(output->writeUint64, cachedBuffer.id);
    SAFE_PARCEL(output->writeBool, hasBarrier);
    SAFE_PARCEL(output->writeUint64, barrierFrameNumber);


    return NO_ERROR;
    return NO_ERROR;
}
}
@@ -832,6 +834,9 @@ status_t BufferData::readFromParcel(const Parcel* input) {
    cachedBuffer.token = tmpBinder;
    cachedBuffer.token = tmpBinder;
    SAFE_PARCEL(input->readUint64, &cachedBuffer.id);
    SAFE_PARCEL(input->readUint64, &cachedBuffer.id);


    SAFE_PARCEL(input->readBool, &hasBarrier);
    SAFE_PARCEL(input->readUint64, &barrierFrameNumber);

    return NO_ERROR;
    return NO_ERROR;
}
}


+21 −1
Original line number Original line Diff line number Diff line
@@ -930,7 +930,7 @@ void SurfaceComposerClient::Transaction::cacheBuffers() {
    }
    }
}
}


status_t SurfaceComposerClient::Transaction::apply(bool synchronous) {
status_t SurfaceComposerClient::Transaction::apply(bool synchronous, bool oneWay) {
    if (mStatus != NO_ERROR) {
    if (mStatus != NO_ERROR) {
        return mStatus;
        return mStatus;
    }
    }
@@ -984,6 +984,14 @@ status_t SurfaceComposerClient::Transaction::apply(bool synchronous) {
    if (mAnimation) {
    if (mAnimation) {
        flags |= ISurfaceComposer::eAnimation;
        flags |= ISurfaceComposer::eAnimation;
    }
    }
    if (oneWay) {
      if (mForceSynchronous) {
          ALOGE("Transaction attempted to set synchronous and one way at the same time"
                " this is an invalid request. Synchronous will win for safety");
      } else {
          flags |= ISurfaceComposer::eOneWay;
      }
    }


    // If both mEarlyWakeupStart and mEarlyWakeupEnd are set
    // If both mEarlyWakeupStart and mEarlyWakeupEnd are set
    // it is equivalent for none
    // it is equivalent for none
@@ -1399,6 +1407,18 @@ std::shared_ptr<BufferData> SurfaceComposerClient::Transaction::getAndClearBuffe
    return bufferData;
    return bufferData;
}
}


SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBufferHasBarrier(
        const sp<SurfaceControl>& sc, uint64_t barrierFrameNumber) {
    layer_state_t* s = getLayerState(sc);
    if (!s) {
        mStatus = BAD_INDEX;
        return *this;
    }
    s->bufferData->hasBarrier = true;
    s->bufferData->barrierFrameNumber = barrierFrameNumber;
    return *this;
}

SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBuffer(
SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBuffer(
        const sp<SurfaceControl>& sc, const sp<GraphicBuffer>& buffer,
        const sp<SurfaceControl>& sc, const sp<GraphicBuffer>& buffer,
        const std::optional<sp<Fence>>& fence, const std::optional<uint64_t>& frameNumber,
        const std::optional<sp<Fence>>& fence, const std::optional<uint64_t>& frameNumber,
+18 −20
Original line number Original line Diff line number Diff line
@@ -145,12 +145,14 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) {
        return status;
        return status;
    }
    }


    layoutParamsFlags = Flags<Flag>(parcel->readInt32());
    layoutParamsType = static_cast<Type>(parcel->readInt32());
    float dsdx, dtdx, tx, dtdy, dsdy, ty;
    float dsdx, dtdx, tx, dtdy, dsdy, ty;
    int32_t touchOcclusionModeInt;
    int32_t lpFlags, lpType, touchOcclusionModeInt, inputConfigInt;
    sp<IBinder> touchableRegionCropHandleSp;

    // clang-format off
    // clang-format off
    status = parcel->readInt32(&frameLeft) ?:
    status = parcel->readInt32(&lpFlags) ?:
        parcel->readInt32(&lpType) ?:
        parcel->readInt32(&frameLeft) ?:
        parcel->readInt32(&frameTop) ?:
        parcel->readInt32(&frameTop) ?:
        parcel->readInt32(&frameRight) ?:
        parcel->readInt32(&frameRight) ?:
        parcel->readInt32(&frameBottom) ?:
        parcel->readInt32(&frameBottom) ?:
@@ -166,32 +168,28 @@ status_t WindowInfo::readFromParcel(const android::Parcel* parcel) {
        parcel->readInt32(&touchOcclusionModeInt) ?:
        parcel->readInt32(&touchOcclusionModeInt) ?:
        parcel->readInt32(&ownerPid) ?:
        parcel->readInt32(&ownerPid) ?:
        parcel->readInt32(&ownerUid) ?:
        parcel->readInt32(&ownerUid) ?:
        parcel->readUtf8FromUtf16(&packageName);
        parcel->readUtf8FromUtf16(&packageName) ?:
    // clang-format on
        parcel->readInt32(&inputConfigInt) ?:

        parcel->readInt32(&displayId) ?:
    if (status != OK) {
        return status;
    }

    touchOcclusionMode = static_cast<TouchOcclusionMode>(touchOcclusionModeInt);

    inputConfig = Flags<InputConfig>(parcel->readInt32());
    // clang-format off
    status = parcel->readInt32(&displayId) ?:
        applicationInfo.readFromParcel(parcel) ?:
        applicationInfo.readFromParcel(parcel) ?:
        parcel->read(touchableRegion) ?:
        parcel->read(touchableRegion) ?:
        parcel->readBool(&replaceTouchableRegionWithCrop);
        parcel->readBool(&replaceTouchableRegionWithCrop) ?:
        parcel->readNullableStrongBinder(&touchableRegionCropHandleSp) ?:
        parcel->readNullableStrongBinder(&windowToken);
    // clang-format on
    // clang-format on


    if (status != OK) {
    if (status != OK) {
        return status;
        return status;
    }
    }


    touchableRegionCropHandle = parcel->readStrongBinder();
    layoutParamsFlags = Flags<Flag>(lpFlags);
    layoutParamsType = static_cast<Type>(lpType);
    transform.set({dsdx, dtdx, tx, dtdy, dsdy, ty, 0, 0, 1});
    transform.set({dsdx, dtdx, tx, dtdy, dsdy, ty, 0, 0, 1});
    touchOcclusionMode = static_cast<TouchOcclusionMode>(touchOcclusionModeInt);
    inputConfig = Flags<InputConfig>(inputConfigInt);
    touchableRegionCropHandle = touchableRegionCropHandleSp;


    status = parcel->readNullableStrongBinder(&windowToken);
    return OK;
    return status;
}
}


// --- WindowInfoHandle ---
// --- WindowInfoHandle ---
Loading