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

Commit bf23343e authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5631559 from 4380045b to qt-qpr1-release

Change-Id: I73bae0ca10b1759c81b1d08e6192132dceb15b87
parents e1bc6924 4380045b
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2172,9 +2172,8 @@ void InputDispatcher::dispatchPointerDownOutsideFocus(uint32_t source, int32_t a
        return;
    }

    int32_t displayId = inputWindowHandle->getInfo()->displayId;
    sp<InputWindowHandle> focusedWindowHandle =
            getValueByKey(mFocusedWindowHandlesByDisplay, displayId);
            getValueByKey(mFocusedWindowHandlesByDisplay, mFocusedDisplayId);

    bool hasFocusChanged = !focusedWindowHandle || focusedWindowHandle->getToken() != newToken;

+6 −0
Original line number Diff line number Diff line
@@ -545,6 +545,12 @@ void BufferLayer::notifyAvailableFrames() {
        if (headFrameNumber >= point->getFrameNumber() && headFenceSignaled &&
            presentTimeIsCurrent) {
            point->setFrameAvailable();
            sp<Layer> requestedSyncLayer = point->getRequestedSyncLayer();
            if (requestedSyncLayer) {
                // Need to update the transaction flag to ensure the layer's pending transaction
                // gets applied.
                requestedSyncLayer->setTransactionFlags(eTransactionNeeded);
            }
        }
    }
}
+17 −5
Original line number Diff line number Diff line
@@ -144,6 +144,20 @@ Layer::~Layer() {
 */
void Layer::onLayerDisplayed(const sp<Fence>& /*releaseFence*/) {}

void Layer::removeRemoteSyncPoints() {
    for (auto& point : mRemoteSyncPoints) {
        point->setTransactionApplied();
    }
    mRemoteSyncPoints.clear();

    {
        Mutex::Autolock pendingStateLock(mPendingStateMutex);
        for (State pendingState : mPendingStates) {
            pendingState.barrierLayer_legacy = nullptr;
        }
    }
}

void Layer::onRemovedFromCurrentState() {
    mRemovedFromCurrentState = true;

@@ -162,10 +176,7 @@ void Layer::onRemovedFromCurrentState() {
    // never finish applying transactions. We signal the sync point
    // now so that another layer will not become indefinitely
    // blocked.
    for (auto& point: mRemoteSyncPoints) {
        point->setTransactionApplied();
    }
    mRemoteSyncPoints.clear();
    removeRemoteSyncPoints();

    {
    Mutex::Autolock syncLock(mLocalSyncPointMutex);
@@ -667,7 +678,7 @@ void Layer::pushPendingState() {
            // to be applied as per normal (no synchronization).
            mCurrentState.barrierLayer_legacy = nullptr;
        } else {
            auto syncPoint = std::make_shared<SyncPoint>(mCurrentState.frameNumber_legacy);
            auto syncPoint = std::make_shared<SyncPoint>(mCurrentState.frameNumber_legacy, this);
            if (barrierLayer->addSyncPoint(syncPoint)) {
                mRemoteSyncPoints.push_back(std::move(syncPoint));
            } else {
@@ -1510,6 +1521,7 @@ bool Layer::detachChildren() {
        if (client != nullptr && parentClient != client) {
            child->mLayerDetached = true;
            child->detachChildren();
            child->removeRemoteSyncPoints();
        }
    }

+10 −2
Original line number Diff line number Diff line
@@ -733,8 +733,11 @@ protected:

    class SyncPoint {
    public:
        explicit SyncPoint(uint64_t frameNumber)
              : mFrameNumber(frameNumber), mFrameIsAvailable(false), mTransactionIsApplied(false) {}
        explicit SyncPoint(uint64_t frameNumber, wp<Layer> requestedSyncLayer)
              : mFrameNumber(frameNumber),
                mFrameIsAvailable(false),
                mTransactionIsApplied(false),
                mRequestedSyncLayer(requestedSyncLayer) {}

        uint64_t getFrameNumber() const { return mFrameNumber; }

@@ -746,10 +749,13 @@ protected:

        void setTransactionApplied() { mTransactionIsApplied = true; }

        sp<Layer> getRequestedSyncLayer() { return mRequestedSyncLayer.promote(); }

    private:
        const uint64_t mFrameNumber;
        std::atomic<bool> mFrameIsAvailable;
        std::atomic<bool> mTransactionIsApplied;
        wp<Layer> mRequestedSyncLayer;
    };

    // SyncPoints which will be signaled when the correct frame is at the head
@@ -928,6 +934,8 @@ private:
    void setZOrderRelativeOf(const wp<Layer>& relativeOf);

    bool mGetHandleCalled = false;

    void removeRemoteSyncPoints();
};

} // namespace android
+1 −1
Original line number Diff line number Diff line
@@ -297,7 +297,7 @@ private:
    const scheduler::RefreshRateConfigs& mRefreshRateConfigs;

    // Global config to force HDR content to work on DEFAULT refreshRate
    static constexpr bool mForceHDRContentToDefaultRefreshRate = true;
    static constexpr bool mForceHDRContentToDefaultRefreshRate = false;
};

} // namespace android
Loading